On 03/08/2012 04:09 PM, Adrian Popa wrote:
> Salut.
>
> Încercam să fac un debugging la un script ca să dau de următorul
> comportament ciudat:
>
> Sistemul pe care functioneaza:
> [root@panopticon ~]# date
> Thu Mar  8 16:06:35 EET 2012
> [root@panopticon ~]# date --date='2 days 9 hours 35 minutes ago'
> Tue Mar  6 06:31:36 EET 2012
> [root@panopticon ~]# set | grep LANG
> LANG=en_US.ISO-8859-1
> [root@panopticon ~]# date --version
> date (coreutils) 5.2.1
>
> Sistemul pe care nu functioneaza:
> adrianp@frost:~$ date
> Thu Mar  8 16:08:03 EET 2012
> adrianp@frost:~$ date --date='2 days 9 hours 35 minutes ago'
> Sun Mar 11 00:33:11 EET 2012
> adrianp@frost:~$ set | grep LANG
> LANG=en
> LANGUAGE=en
> adrianp@frost:~$ date --version
> date (GNU coreutils) 7.4
>
> In afara de diferenta de versiune, aveti idee de ce e interpretat diferit
> stringul --date? Il mai afecteaza vreo variabila de environment?
`-d DATESTR'
`--date=DATESTR'
      Display the date and time specified in DATESTR instead of the
      current date and time.  DATESTR can be in almost any common
      format.  It can contain month names, time zones, `am' and `pm',
      `yesterday', etc.  For example, `--date="2004-02-27
      14:19:13.489392193 +0530"' specifies the instant of time that is
      489,392,193 nanoseconds after February 27, 2004 at 2:19:13 PM in a
      time zone that is 5 hours and 30 minutes east of UTC.
      Note: input currently must be in locale independent format. E.g.,
      the LC_TIME=C below is needed to print back the correct date in
      many locales:
           date -d "$(LC_TIME=C date)"

_______________________________________________
RLUG mailing list
RLUG@lists.lug.ro
http://lists.lug.ro/mailman/listinfo/rlug

Reply via email to