[Glass] Date today asDateAndTime does not return a DateAndTime in the local timezone

Johan Brichau via Glass glass at lists.gemtalksystems.com
Wed Mar 15 12:06:21 PDT 2017


I’ll send in a pull request.
Would be great as this single patch eliminates all our test failures on Gemstone 3.2 (with the last GLASS version :)

Johan

> On 14 Mar 2017, at 17:30, Dale Henrichs via Glass <glass at lists.gemtalksystems.com> wrote:
> 
> 
> 
> On 03/14/2017 04:44 AM, Johan Brichau via Glass wrote:
>> Hi there,
>> 
>> `DateAndTime today` returns a DateAndTime instance in the local timezone. (e.g. 2017-03-14T00:00:00+01:00)
>> `Date today asDateAndTime` returns a DateAndTime instance in the UTC timezone (e.g. 2017-03-14T00:00:00+00:00)
>> 
>> The relevant commit that changed this behavior in GLASS/GsDevKit dates back from 08/2014 [1].
>> Before that change, the above pieces of code would both return an instance in the local timezone
>> 
>> I’m inclined to say it’s more consistent if both return an instance in the local timezone.
>> Thoughts?
> I agree ... it is true that passing in a Duration instance instead of nil, improves performance, but at the expense of giving a wrong answer, which is not right ...
> 
> Dale
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list