Subj : JS Object save_msg() To : Digital Man From : deon Date : Thu Dec 19 2024 20:45:14 Re: JS Object save_msg() By: deon to Digital Man on Thu Dec 19 2024 07:52 pm Howdy, Following on from my previous message, I think I understand what is going on - doesnt make sense to me why, but I get it. I raised this thread, because a message I just saved with save_msg(), when immediately read would display a message of "11hrs from now". I looked further into the code, and understand what age_of_posted_item() with smb_tzutc() is doing. When Sync starts, xpTimeZone_local() shows the offset from UTC, and sends a warning message on the console on startup, in my case its 660. When saving a message with save_msg(), when_written_time, is populated with time() if no value is provided, which is the UTC time when the function is called. When displaying the message, the age is calculated between the value of when_written_time (which is utc), and time() [utc] minus xpTimeZone_local() plus an offset (which might be negative) derived from scfg -> System -> Local Time Zone. Since I had UTC there, it would be zero, so the age of the messages is immediately 660s old (utc minus 660 plus 0). Thus when when scfg -> System ->Local Time Zone equals xpTimeZone_Local(), they cancel each other out and age_of_posted_item() is truely however many seconds ago the message was stored. (utc minus 660 plus 660). If this is what is intended, then OK, I get it. Why somebody would find this useful I guess I dont understand. :) ....лоеп --- ю Synchronet ю AnsiTEX bringing back videotex but with ANSI * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .