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

REBOL time is cool

 [1/8] from: ryan:christiansen:intellisol at: 15-Jun-2001 14:18


Sometimes I just can't get over how useful REBOL's built-in datatypes are. Take time! for example. I needed to calcuate the time in each of our corporate offices for a web page. REBOL makes it so EASY and readable... Fargo: now Sydney: Fargo + 15:00 Melbourne: Fargo + 15:00 SingaporeCity: Fargo + 13:00 London: Fargo + 6:00 Very cool. -Ryan

 [2/8] from: gchiu:compkarori at: 16-Jun-2001 9:18


On Fri, 15 Jun 2001 14:18:25 -0500 [ryan--christiansen--intellisol--com] wrote:
> Sometimes I just can't get over how useful REBOL's > built-in datatypes are.
<<quoted lines omitted: 8>>
> London: Fargo + 6:00 > Very cool.
Daylight saving?? -- Graham Chiu

 [3/8] from: dness:home at: 15-Jun-2001 17:46


[ryan--christiansen--intellisol--com] wrote:
> Sometimes I just can't get over how useful REBOL's built-in datatypes are. > Take time! for example. I needed to calcuate the time in each of our
<<quoted lines omitted: 5>>
> London: Fargo + 6:00 > Very cool.
Since different places shift to `summer time' on different days, it's pretty dangerous to relate times city/city (where you are subject to the vagueries of when both shift). Generally basing times off UTC at least stands the chance of being able to keep your head straight, and only worry about one thing at at time...

 [4/8] from: allenk:powerup:au at: 16-Jun-2001 8:43


Ryan, Yeah REBOL date is cool. Have a look at my world clock script. Just alter the data block with your offices and their gmt timzones, then you can will have quick reference clock for all your offices. Cheers, Allen K

 [5/8] from: sterling:rebol at: 15-Jun-2001 15:47


Wow. Rough crowd out there today. Everybody's a critic... hehe. You end up with the same conversion/comparison issues of daylight savings in any language. The difference is that in REBOL when you look at your code six months later when time switches again and there's a little bug there... you still understand all 5 lines. Yay! I like the REBOL solution over: struct date_time { int year; int month; int day; ... } struct date_time* add_date (...) {...} AAAAAAARRRRGGGHH!!! Run for the hills! Chalk up another point for the good guys. ;) But I guess I'm preaching to the choir, eh? Sterling

 [6/8] from: carl:cybercraft at: 16-Jun-2001 20:19


On 16-Jun-01, [sterling--rebol--com] wrote:
> Wow. Rough crowd out there today. Everybody's a critic... hehe. > You end up with the same conversion/comparison issues of daylight > savings in any language. The difference is that in REBOL when you > look at your code six months later when time switches again and > there's a little bug there... you still understand all 5 lines. Yay!
Indeed, but for the picky ones this site... http://www.hilink.com.au/times/ should be a breeze to parse and get the current times you want with daylight saving taken into account. Plus it tells you when daylight saving is next due to change for the locations. (And yes, I checked Allen's World Clock script to see if it was accessing it, but it wasn't.:) -- Carl Read [carl--cybercraft--co--nz]

 [7/8] from: ryan:christiansen:intellisol at: 18-Jun-2001 8:28


Very good point. How can I set the /zone value for 'now to GMT? David Ness <[DNess--Home--C] To: [rebol-list--rebol--com] om> cc: Sent by: Subject: [REBOL] Re: REBOL time is cool rebol-bounce@ rebol.com 06/15/2001 04:46 PM Please respond to rebol-list [ryan--christiansen--intellisol--com] wrote:
> Sometimes I just can't get over how useful REBOL's built-in datatypes
are.
> Take time! for example. I needed to calcuate the time in each of our > corporate offices for a web page. REBOL makes it so EASY and readable...
<<quoted lines omitted: 4>>
> London: Fargo + 6:00 > Very cool.
Since different places shift to `summer time' on different days, it's pretty dangerous to relate times city/city (where you are subject to the vagueries of when both shift). Generally basing times off UTC at least stands the chance of being able to keep your head straight, and only worry about one thing at at time...

 [8/8] from: dness:home at: 19-Jun-2001 13:44


[ryan--christiansen--intellisol--com] wrote:
> Very good point. How can I set the /zone value for 'now to GMT? > David Ness
<<quoted lines omitted: 3>>
> rebol-bounce@ > rebol.com
... The most widely shared convention across Dos/Unix/Windows is to interrogate the `TZ' environmental variable which is (using mine as an example) something like EST5EDT indicating that the `names' for standard and summer time in my zone are EST and EDT respectively and the UTC (it's not called GMT anymore) is obtained correction (for standard time) is 5 hours (i.e. you add 5 hours to my indicated clock to get UTC).

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted