~rjarry/aerc-discuss

1

Display date and time but not timezone

Details
Message ID
<CQRV5SSBY3U1.Z7BPFY0CI8LL@arch>
DKIM signature
missing
Download raw message
https://pkg.go.dev/time?utm_source=godoc#pkg-constants

I've been reading this link that the timestamp-format config option
refers to. I tried different things, but I couldn't make it display date
+ time *without* timezone.

Whenever I put something like "2006-01-02 15:04" there, it automatically
adds "CET" or "CEST" to the end. Is there a way to make this Go function
do exactly what I want, i.e. maybe the behavior of date(1)?

I'm not a Go programmer, could anyone please help me do this?

Ivan
Details
Message ID
<CQRWLSPAKMZZ.92UDYUXPFWE6@mashenka>
In-Reply-To
<CQRV5SSBY3U1.Z7BPFY0CI8LL@arch> (view parent)
DKIM signature
missing
Download raw message
On Sat Feb 25, 2023 at 19:43, Ivan Oleynikov wrote:
> https://pkg.go.dev/time?utm_source=godoc#pkg-constants
>
> I've been reading this link that the timestamp-format config option
> refers to. I tried different things, but I couldn't make it display date
> + time *without* timezone.
>
> Whenever I put something like "2006-01-02 15:04" there, it automatically
> adds "CET" or "CEST" to the end. Is there a way to make this Go function
> do exactly what I want, i.e. maybe the behavior of date(1)?

I have this in my reply template, which outputs as above

On {{dateFormat (.OriginalDate | toLocal) "Mon Jan 02, 2006 at 15:04"}}, {{(index .OriginalFrom 0).Name}} wrote:

I'm guessing you need toLocal?

Best,
Bence



-- 
+36305425054
bence.ferdinandy.com
Reply to thread Export thread (mbox)