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: Ken Hornstein
Subject: Re: displaying Date using local timezone
Date: Tue, 16 Mar 2021 15:37:29 -0400

>I took a look at trying to suppress the extra output if the timezone is already
>the same as my local zone, but as far as I can tell, it's not possible.  
>There's
>no way to get access to the original timezone and the local timezone at the
>same time, since once you run date2local, the original is gone.
>
>Am I right about this?

I ... THINK it might be possible?

Something like this, maybe (substitute -300 for your timezone offset in
minutes):

%(pretty{text})%(void(zone{text}))%<(ne -300)%(void(szone{text}))%<(eq 1) 
(Local: %(date2local{text})%(day{text}) %(hour{text}):%02(min{text}) 
%(tzone{text}))%>%>

You probably want to put a test for %(nodate) around that.  The idea is
you want to check the timezone before the call to date2local.

--Ken



reply via email to

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