nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: displaying Date using local timezone


From: Paul Fox
Subject: Re: displaying Date using local timezone
Date: Thu, 18 Mar 2021 10:59:41 -0400

bob wrote:
 > This thread and Ken's suggestion tempted me to fiddle with this
 > stuff, and I found that (zone) provides you your "standard time"
 > UTC offset (in minutes), regardless of (dst)'s result.  So, this,
 > grabbed from my mhl.format file, or something like it might
 > suffice for you:
...

I replied privately to Bob earlier, but wanted to close the loop.  I
believe his observation that "zone" doesn't change with "dst" solves
my twice-yearly problem, though I still have to hardcode my timezone. I
can live with that.

Here's what I have in mhl.headers, now:
;
; Show's sender's date optionally followed by an abbreviated translation.
; (i.e., it only translates to local if it wasn't in local to start with.)
; The number in the comparison "(ne -300)" is the local standard time zone
; offset in *minutes* from UTC.  So EST is -5 hours, or -300 minutes.
Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%(void(zone{text}))%<(ne
 -300) (Local: %(date2local{text})%(day{text}) %02(hour{text}):%02(min{text}) 
%(tzone{text}))%>%>"

Thanks all!
paul
=----------------------
paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 42.6 degrees)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]