Re: time stamp format in log

Peter Pentchev <[email protected]> Sat, 29 Jan 2022 20:44:26 +0200
Newsgroups gmane.mail.fetchmail.user
Message-ID <[email protected]>
On Sat, Jan 29, 2022 at 11:17:51AM -0500, joea- lists wrote:
> 
> > Am 28.01.22 um 21:43
> > joea‑ lists:
> >> I'd prefer to see time stamps in the fetchmail log in 24 hr format,
> but I 
> > see this:
> >>
> >> fetchmail: 6.4.21 querying imap.AAAA.com (protocol IMAP) at Fri 28
> Jan 2022 
> > 03:35:22 PM EST: poll completed
> >> fetchmail: sleeping at Fri 28 Jan 2022 03:35:22 PM EST for 120
> seconds
> >>
> >> Did not find a time format in man pages or via searching the wilds.
> >>
> >> It is probably right under my nose.  Or will be once someone tells
> me how.
> > 
> > Yes, it is a system standard feature that people appear to be
> oblivious
> > of, so is not documented in fetchmail. See:
> > 
> > https://wiki.archlinux.org/title/Locale#LC_TIME:_date_and_time_format
> <‑
> > grarpamp watch this
> > 
> > locale(7) manual page.
> > 
> 
> No change.  Perhaps there is a "local" setting for fetchmail?  Seems
> there
> should be but if there is, it has escaped my efforts to find it.  Easy
> to do
> it seems. 
> 
> Other logs and terminal display all show 24hr format.with no
> alterations
> to environment settings.
> 
> I tried changing /etc/locale.conf and think I caused
> it to take effect (via "localectl"), and restarted fetchmail, but no
> change.

If you run fetchmail using a systemd service file, try adding
something like:

  Environment=LC_TIME=....

...specifying the name of the locale you want fetchmail to use.
Then restart the fetchmail systemd service.

If this doesn't work, try using LC_ALL instead of LC_TIME, or
trying to figure out whether anything else sets an LC_ALL
environment variable to override your LC_TIME setting.

G'luck,
Peter

-- 
Peter Pentchev  [email protected] [email protected] [email protected]
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

_______________________________________________
Fetchmail-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fetchmail-users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEELuenpRf8EkzxFcNUZR7vsCUn3xMFAmH1iv4ACgkQZR7vsCUn
3xPNMhAAiC9vwQCmfXpWMO4ug3FxPti1qzIqbRMIj8JZqp4FMkf7H8p3TqT3/Ldt
IsO9Np5b80Hs5QNfL4PPI/8Gn+sT5xdfh8NIk361Sxv0KcOVPJPOtwI/gS8FMbbo
KyBl+6e8NnalQL+UOn0xecCO+rzrUk5YlsqVUdfts7yUNXn6d5XJTCkwJwlEEaEq
jaLWT5hmgw0gj6NsEPLDf+4EGBl2pHh1NXX9JTn9Gy5NDQmqX3RPRYj+CqMPHxLm
pZeDzDQ8fK7aIAh3lg8lx6rqQd4yiLzfYew0hf9of30PVp85F8p4DOK0Sh8FkaHQ
Phv8GtHN1/+Sl7yvJ9kM/hL5Xpvh1a0xHO1TraRM8N03kuplVCTwSSoCEooEhC3u
b70HmKkpJO2hg2XcPbIVWTMunjFkEhOumcS80EZ3wZ4IkqmKYan1X2D/ytPlj9EO
z2e8BuCFwYzfnvJeTAZE0wxUClWzun9x5uXK++IDVLWV9r+PGgZLJXe7c0igKtN4
r0rB3kPTawnOUE1V4COWN1NBVAsI9biFFaMsxZNF8WMQTt3pM7/tv5nBREbty2nC
5h4k3s5zZ4aX7juf3YuPau31pn9cK8wRLvG7KfBK8DmOKKX/WwLJDeNHyE+lgiKK
fmJVCHugkiHFK4RTzE+appsdhKqUF0PoAPJHZ9ROcYDcjYnAqiA=
=cSa+
-----END PGP SIGNATURE-----