Re: time stamp format in log

"joea- lists" <[email protected]> Sat, 29 Jan 2022 14:10:36 -0500
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
> 

Thanks, "Environment=LC_TIME=en_GB.UTF-8"  appears to have worked.  

I even searched for more data on systemd "Unit file" options and did
not see that.

joe a.





_______________________________________________
Fetchmail-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fetchmail-users