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

Johan Brichau via Glass glass at lists.gemtalksystems.com
Tue Mar 14 04:44:48 PDT 2017


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?

cheers
Johan

[1] https://github.com/GsDevKit/GsDevKit/commit/05dfc832ff9aaa8e37b7cfeaf2a8172f6ed1374b <https://github.com/GsDevKit/GsDevKit/commit/05dfc832ff9aaa8e37b7cfeaf2a8172f6ed1374b>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20170314/de82bdbb/attachment.html>


More information about the Glass mailing list