On Fri, Sep 5, 2014 at 9:52 AM, Alex Vondrak <ajvond...@gmail.com> wrote:

> On Thu, Sep 4, 2014 at 4:06 PM, Jon Harper <jon.harpe...@gmail.com> wrote:
>
>> How about:
>> : today ( -- timestamp ) now midnight instant >>gmt-offset ; inline
>>
>
> Or really just
>
> : today ( -- timestamp ) gmt midnight ; inline
>
> No, this is not the correct date.  "2014-09-05 01:00:00+02:00" is the same
instant as "2014-09-04 23:00:00Z" (ie "now" and "gmt" would return those
timestamps if invoked at the same time), but the date is not the same:
09-05 and 09-04 (and the correct one is really 09-05 when you are in the +2
timezone)


> I guess less drastic would be for `ymd>timestamp` to just use local time;
> right now it's defined with `<date-gmt>`:
> http://docs.factorcode.org/content/word-%28ymd__gt__timestamp%29%2Ccalendar.format.html
> I know John mentioned it, but I'm not sure why that shouldn't just be
> `<date>`, since most other things appear to use local time as well (per the
> above).
>
But then things go wrong in the rare cases when you change your timezone.
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to