From: joea- l. <joe...@j4...> - 2022-01-28 20:44:23
|
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. joe a |
From: grarpamp <gra...@gm...> - 2022-01-29 06:00:58
|
> time format As to globally agreed standard formats, being single field parseable and easily human readable, please search: iso8601 |
From: Matthias A. <mat...@gm...> - 2022-01-29 12:22:00
|
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. |
From: Andrew C A. <fet...@ai...> - 2022-01-29 14:23:41
|
On Fri, 28 Jan 2022, joea- lists wrote: > 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. >From https://sourceforge.net/projects/fetchmail/files/branch_6.5/ version 6.5 has (or will have, it is still in beta) * fetchmail, with --logfile, now logs time stamps into the file, in localtime and in the format "Jun 20 23:45:01 fetchmail: ". It will be localized through the environment variables LC_TIME (or LC_ALL) and TZ. I did't run v6.4 in verbose mode, so didn't get the sleeping at ... messages. -- Andrew C. Aitchison Kendal, UK an...@ai... |
From: joea- l. <joe...@j4...> - 2022-01-29 16:18:15
|
> 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. joe a. |
From: Carlos E. R. <rob...@te...> - 2022-01-29 19:27:52
Attachments:
OpenPGP_signature
|
On 2022-01-29 17:17, joea- lists wrote: > Other logs and terminal display all show 24hr format.with no > alterations > to environment settings. Most other logs in openSUSE are written by syslog, which uses a different system. Journal aside. -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar) |
From: Peter P. <ro...@ri...> - 2022-01-29 18:44:42
Attachments:
signature.asc
|
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 ro...@ri... ro...@de... pp...@st... PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 |
From: joea- l. <joe...@j4...> - 2022-01-29 19:10:55
|
> 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. |
From: grarpamp <gra...@gm...> - 2022-01-30 03:52:19
|
What platform? $ uname -a What are the defaults? $ env - locale $ env - locale -k d_t_fmt $ locale $ locale -k d_t_fmt The leading zero "03 PM" seems unusual at first sight, perhaps check if it is platform specific... %0* GNU libc extension. Explicitly specify zero for padding. https://pubs.opengroup.org/onlinepubs/9699919799/ >> https://wiki.archlinux.org/title/Locale#LC_TIME:_date_and_time_format >> locale(7) > No change. LC_TIME can only pick from locales predefined in the system, which may not contain what is sought. And randomly picking different locales outside the users locale, to get 24h or 8601, such as Arch webpage suggests, can change other things along with it, compare the definitions to see. To get standard iso8601, or 24h, both of which are nominally independent from language and country, users may need to customize or create a locale. Locale's honored only if the app calls the libraries. See: sleeping at timestamp() https://www.freebsd.org/cgi/man.cgi?query=localedef https://www.freebsd.org/cgi/man.cgi?query=locale https://www.freebsd.org/cgi/man.cgi?query=setlocale https://www.freebsd.org/cgi/man.cgi?query=strftime https://www.freebsd.org/cgi/man.cgi?query=environ On that platform... env - LC_ALL=C TZ=UTC locale -k d_t_fmt d_t_fmt="%a %b %e %H:%M:%S %Y" env - LC_ALL=C TZ=UTC ./fetchmail -v 127.0.0.1 fetchmail: 6.4.27 querying 127.0.0.1 (protocol auto) at Sun Jan 30 xx:xx:xx 2022: poll started env - LC_ALL=en_GB.UTF-8 TZ=UTC locale -k d_t_fmt d_t_fmt="%a %e %b %X %Y" env - LC_ALL=en_GB.UTF-8 TZ=UTC ./fetchmail -v 127.0.0.1 fetchmail: 6.4.27 querying 127.0.0.1 (protocol auto) at Sun 30 Jan xx:xx:xx 2022: poll started env - LC_ALL=ru_RU.UTF-8 TZ=UTC locale -k d_t_fmt d_t_fmt="%A, %e %B %Y г. %X" env - LC_ALL=ru_RU.UTF-8 TZ=UTC ./fetchmail -v 127.0.0.1 fetchmail: 6.4.27 запрашивает 127.0.0.1 (протокол auto) на воскресенье, 30 января 2022 г. xx:xx:xx: опрос начат env - LC_ALL=iso8601 TZ=UTC locale -k d_t_fmt d_t_fmt="%Y%m%dT%H%M%S%z" env - LC_ALL=iso8601 TZ=UTC ./fetchmail -v 127.0.0.1 fetchmail: 6.4.27 querying 127.0.0.1 (protocol auto) at 20220130Txxxxxx+0000: poll started 8601 uses 24h per standard. Existance of 8601 allows apps to advertise they are using a standard format, that the world has agreed through ISO process, by default for any timestamps that may be present in the apps logs. But since there are no such shipped LC_TIME, and locale does not split between GUI and log, the apps have to do the log, letting user override via some app config. "Locales" are meant for use in equivalent of human interface / display / GUI, but are pain in the ass trying to make them serve for log since they require reversing tools to do anything programmatic with, if they are even parseable at all due to other log problems in the apps. People who never had to look at, digest, parse, filter, sort, merge, store, extract, etc all sorts of logs, unfortunately often may not yet appreciate the wisdom of using 8601 for logs. 8601 serves both the programming and reading purposes in logs. YMMV... cat */LC_TIME | sort | uniq -c | sort -nr 131 %a %e %b %X %Y 20 %a %b %e %X %Y 8 %a %b/%e %T %Y 4 %d %b %Y %X 3 %x %A %X 3 %b %d %Y %X 3 %a %_m/%e %T %Y 3 %Y - %b - %e %a %X 2 %e. %b, %Y. gads %X 2 %a %e %b %Y %X 2 %a %d %b %Y %X 2 %A, %e %B %Y �. %X 1 %Y%m%dT%H%M%S%z 1 %Y оны %B сарын %e, %A гараг, %X 1 %A, %e %B %Y �. %X 1 %A, %e %B %Y ի. %X 1 %A, %e %B %Y �. %X 1 %A, %e %B %Y ж. %X 1 %A, %e %B %Y г. %X 1 %A, %e %B %Y �. %X 1 %A %e %B %Y %H:%M:%S 1 %A %e %B %Y %H:%M.%S |
From: Carlos E. R. <rob...@te...> - 2022-01-30 12:39:06
Attachments:
OpenPGP_signature
|
On 2022-01-30 04:52, grarpamp wrote: > What platform? He was using openSUSE Leap 15.3 the other day. -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar) |
From: joea- l. <joe...@j4...> - 2022-01-30 16:37:28
|
Thanks for the reply. The latter part of your post was difficult for me to comprehend. However, I believe the issue is related to how fetchmail deals with the date/time as by altering the environment the daemon "runs in", the time stamp was altered. But, in line below, I will attempt to address your questions: > What platform? Opensuse 15.2 (Carlos mentioned 15.3, but that was a test VM I spun up to compare the vendor supplied rendition of fetchmail "as installed" to my own setup. That bought up some other questions I may address in the appropriate forum. > $ uname -a Linux AAAAAA 5.3.18-lp152.87-default #1 SMP Sun Aug 8 21:53:57 UTC 2021 (44d702a) x86_64 x86_64 x86_64 GNU/Linux (AAAAAA replaces what I took to be the host name) > > What are the defaults? > > $ env - locale > $ env - locale -k d_t_fmt > $ locale > $ locale -k d_t_fmt locale LANG=POSIX LC_CTYPE=en_US.UTF-8 LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL= locale -k d_t_fmt d_t_fmt="%a %b %e %H:%M:%S %Y" > The leading zero "03 PM" seems unusual at first sight, > perhaps check if it is platform specific... > %0* GNU libc extension. Explicitly specify zero for padding. As mentioned changing the fetchmail running environment as shown below in a snippet of my systemd fetchmail unit file gives me a 24 hr format. There may be other ways to address the format without changing the "language" but I am currently not aware of them. [Service] Type=simple . . . Environment=LC_TIME=en_GB.UTF-8 User=fetchmail Group=fetchmail . . . joe a. |
From: Matthias A. <mat...@gm...> - 2022-01-30 20:28:06
|
Am 30.01.22 um 04:52 schrieb grarpamp: > > Existance of 8601 allows apps to advertise they are > using a standard format, that the world has agreed > through ISO process, by default for any timestamps > that may be present in the apps logs. But since there > are no such shipped LC_TIME, and locale does not split > between GUI and log, the apps have to do the log, > letting user override via some app config. > "Locales" are meant for use in equivalent of > human interface / display / GUI, but are pain > in the ass trying to make them serve for log > since they require reversing tools to do anything > programmatic with, if they are even parseable > at all due to other log problems in the apps. It's as simple as "if your log is in a locale I do not understand, I am not supporting you". Review https://www.fetchmail.info/fetchmail-FAQ.html#G3 again and find it enforces LC_ALL=C to stomp over everything with the master switch and get me the ANSI-C locale. Available everywhere since 30+ years. And while the C standard %a %b %e %H:%M:%S %Y is neither ISO8601 nor logical, it is usable. I am the programmer you know... > People who never had to look at, digest, parse, > filter, sort, merge, store, extract, etc all sorts > of logs, unfortunately often may not yet appreciate > the wisdom of using 8601 for logs. 8601 serves > both the programming and reading purposes in logs. ...and there is something called "compatibility" on the other side of the scales. It will likely happen, but not before fetchmail 7. Please file a *short* reminder (don't write an epic) on the Gitlab project site, milestone 7.0, with just "consider switching date-and-time formats to ISO8601" and reference the mailing list archive for this thread, and possibly two or three bullet points with the key items, that's enough. |