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

RFC: Unix time format

 [1/3] from: oliva::david::seznam::cz at: 2-Aug-2002 12:50


Hello rebol-list, does anybody has script for converting Rebol time format to Unix format that means returns seconds since 00:00:00 GMT, Jan. 1, 1970 ? I would like to have this in Rebol for example as: now/unix or now/timestamp or to-unix-time date It would be nice, because a lot of file specifications are using this value for time. thanks.. Oldes

 [2/3] from: g:santilli:tiscalinet:it at: 3-Aug-2002 10:35


Hi RebOldes, On Friday, August 2, 2002, 12:50:49 PM, you wrote: R> to-unix-time date to-unix-time: func [date] [ date/date - 1-1-1970 * 86400 + to-integer date/time ] (I don't have any way to check this out at this moment; so be warned. :) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [3/3] from: oliva:david:seznam:cz at: 6-Aug-2002 11:39


Hello Gabriele, Saturday, August 3, 2002, 10:35:02 AM, you wrote: GS> Hi RebOldes, GS> On Friday, August 2, 2002, 12:50:49 PM, you wrote: R>> to-unix-time date GS> to-unix-time: func [date] [ GS> date/date - 1-1-1970 * 86400 + to-integer date/time GS> ] GS> (I don't have any way to check this out at this moment; so be GS> warned. :) GS> Regards, GS> Gabriele. Thanks, it looks that it produces same values as gmmktime() function in PHP:-)