Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Date/Time Difference - Feature or Bug?

From: lmecir:mbox:vol:cz at: 11-May-2001 23:30

Hi,
> While working with date/time(s) in REBOL between time zones, I noticed > what seems to be an unexpected result. > > t1: 11-May-2001/13:08:52-5:00 > t2: 11-May-2001/13:08:52-7:00 > t1/time - t2/time ; result 0:00 ... because of path refinement, ok > t1/zone - t2/zone ; result 2:00 ... ok > t1 - t2 ; result 0 ... hmmm > equal? t1 t2 ; result false ... ok > > Given the GMT offset, it seems as though the calculation t1 - t2 should > give a 2 hour difference. Am I missing something obvious? > --Scott Jones >
See this: t1: 11-May-2001/13:08:52-5:00 t2: 10-May-2001/15:08:52-5:00 t1 - t2 ; == 1 The meaning: t1 - t2 is the number of days between two dates. Moreover: t1: 11-May-2001/13:08:52-5:00 t2: 11-May-2001/13:08:52-7:00 t1 < t2 ; == true Regards Ladislav