See also: "The Problem with Time and Timezones" 
<https://www.youtube.com/watch?v=-5wpm-gesOY>

😣

On 3/4/21 10:32 PM, Bruce Labitt wrote:
> On 3/4/21 9:56 PM, Joshua Judson Rosen wrote:
>> On 3/4/21 7:13 PM, Bruce Labitt wrote:
>>> Good point.  I'll check that.  Logging machine was set to local time EST.  
>>> But it does have a wireless link, maybe it set itself internally to UT.  
>>> Thanks for the hint.
>> You have your code explicitly calling a function named `UTC from timestamp'.
>>
>> If you want localtime and not UTC, call the function that doesn't start with 
>> "utc".
>>
>> And if you want to assume some particular timezone other than your system's 
>> default,
>> you can pass that as an optional argument.
>>
>> BTW, FYI "UT" is *not* the same thing as "UTC". Timezones are confusing 
>> enough,
>> it's worth spending the extra character to avoid creating even more confusion
>> (or just call it "Z" and save yourself even more characters).
>>
>> And as a general word of advice from someone whose been burnt way too many 
>> times:
>> if you're going to put timestamps in your filenames, either just use UTC
>> or explicitly indicate which timezone the timestamps are assuming.
>>
>> "the local non-UTC timezone" *changes*. Frequently. Like, twice every year 
>> if you're lucky--
>> and more frequently than that if you're unlucky. And if you are, for 
>> example, generating those
>> files/filenames between 1:00 AM and 2:00 AM when you go from EDT to EST in 
>> November
>> (and that "1:00-2:00 localtime" interval *repeats*)..., you'll be sorry.
>>
> These files are written by commercial closed box machines (medical 
> equipment).  There is no choice for the users.  That being said, these 
> machines are designed to basically have the time set once.  (Drift, ntp? 
> what's that?)  If one plays with resetting the time, one can be rewarded 
> by having all your data wiped.
> 
> "UT" was me being lazy.  (Too lazy to type the extra character...)  I 
> don't have any code with explicit timezone stuff in it.  Have to agree 
> it's a good idea to keep time in UTC, to avoid 'many' of the headaches.  
> Nonetheless, it's easy to get confused about all this, especially if 
> external devices don't do time the same way.  (Not all devices handle 
> time correctly.) Then, as you say, you'll be sorry.


-- 
Connect with me on the GNU social network! 
<https://status.hackerposse.com/rozzin>
Not on the network? Ask me for more info!
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to