find and timezone
Ernest Sales
ersaloz at gmail.com
Mon May 7 19:32:03 UTC 2007
On May 6, 2007 Lowell Gilbert wrote:
> "Ernest Sales" <ersaloz at gmail.com> writes:
>
> > Could someone explain why this works fine:
> >
> > # find . -newermt "May 2 12:00:09 CET 2007"
> > [...]
> > #
> >
> > ...whereas this doesn't:
> >
> > # find . -newermt "May 2 12:00:09 CEST 2007"
> > find: Can't parse date/time: May 2 12:00:09 CEST 2007
> > #
> >
> > (CET: Central European Time, ...S...: Summer)
>
> I don't really know the details, but /usr/share/zoneinfo seems to
> define CET and not CEST. If you figure out the syntax, it should be
> easy to add the extra abbreviations.
Thanks for the hint. It looks rather difficult; cf tzfile(5), zic(8).
Moreover the system seems to be aware of CEST:
# date
dilluns, 7 de maig de 2007, 21:03:53 CEST
# zdump CEST
CEST Mon May 7 19:04:03 2007 UTC
#
Looks to me rather as a problem with the way find parses dates. FWIW, my
login.conf reads:
[... my (indirect) login class:]
#
# Usuaris de La Franja. Català, UTF-8 i retocs
#
lafranja|usuaris de La Franja:\
:lang=ca_ES.UTF-8:\
:lc_all=ca_ES.UTF-8:\
:lc_collate=ca_ES.UTF-8:\
:lc_ctype=ca_ES.UTF-8:\
:lc_messages=ca_ES.UTF-8:\
:lc_monetary=ca_ES.UTF-8:\
:lc_numeric=ca_ES.UTF-8:\
:lc_time=ca_ES.UTF-8:\
:charset=UTF-8:\
:tc=default:
[...]
...but only LANG is passed to the environment -- i.e. LC_TIME is not:
# echo $LANG
ca_ES.UTF-8
# echo $LC_TIME
LC_TIME: Undefined variable.
I used to use the output of uname -v (words 5 to 9) with find in a q&d
script to backup custom config files, and this is worked around by now. Just
wonder if it deserves a PR.
---------------------------------------------------------------
plain text emails preferred, cf http://expita.com/nomime.html
More information about the freebsd-questions
mailing list