address "ISREDIT"; "MACRO" /*rexx*/ /* Netscape dates are based on Jan 01, 1970 or jan 00, 1970 */ /* David McRitchie, "The REXX Macros Toolbox" 1996 */ /*--------- 815702894 = 1995/11/06 17:08:14 EDT (22:08 UT) 899999999 = 1998/07/08 08:59:59 EDT (13:59 UT) 999999999 = 2001/09/08 18:46:39 EDT (23:46 UT) Accuracy not guaranteed, not verified -------- ---------------*/ /* year - 1970 = Base Plus */ "cursor = 1 0" do forever "find word p'#########' next nx" if rc \= 0 then exit "(LINE) = LINE .ZCSR" "(ROW,COL) = CURSOR" /* time adjustment based on findings rather than reasoning */ timestamp= substr(line,col,9); adj=22; local="UT" /* GMT */ local = "EST"; adj = 16 /*adjustment for US Eastern Standard time*/ local = "EDT"; adj = 17 /*adjustment for US Eastern Daylight time*/ stamp = timestamp + adj * 3600 seconds = stamp // 60 minutes = (stamp // 3600) % 60 hours = stamp % 3600 days1970 = stamp % 3600 * 24 minutes = stamp % 60 hours = minutes % 60 days = hours % 24 years = days % 365.25 leaps = (years + 2) % 4 /*********************************** year = 95 month = 11 day = 06 hour = 16 minute = 08 sec = 14 leaps = (year - 69)%4 ************************************/ monthd.1 = 0 monthd.2 = 31 monthd.3 = 59 monthd.4 = 90 monthd.5 = 120 monthd.6 = 151 monthd.7 = 181 monthd.8 = 214 monthd.9 = 243 monthd.10 = 273 monthd.11 = 304 monthd.12 = 334 do i = 1 to 12 months.i = monthd.i * 24 * 60 * 60 end /***************************** days = (year - 70) * 365 + leaps + monthd.month + day hours = days * 24 + hour minutes = hours * 60 + minute seconds = minutes * 60 + sec seconds = minutes * 60 + sec - 57600 seconds = seconds + 57600 *********************************/ seconds = stamp rough = seconds % (365.25 * 24 * 3600) rought = (rough + 1 ) % 4 yrsecs = (365 * rough + rought) * 24 * 3600 remain = seconds - yrsecs do i = 12 to 1 by -1 if remain > months.i then leave end year = rough + 1970 month = i month = right("00"||i,2) remain = remain - months.i day = right("00"||(remain % (3600 * 24)),2) remain = remain - day * 3600 * 24 hour = right("00"||(remain % 3600),2) remain = remain - hour * 3600 minute = right("00"||(remain % 60),2) remain = remain - minute * 60 seconds = right("00"||(remain),2) "line_after .zcsr = noteline "" "timestamp "=", year"/"month"/"day hour":"minute":"seconds local"""" end