bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

date bug


From: Jesse Lloyd
Subject: date bug
Date: Sat, 20 Mar 2010 00:40:45 -0700

Hello,

If I do this in a shell script:

#!/bin/bash
echo `date +%X` > /var/www/loger


save it as /var/www/test.sh

make it executable  (chmod +x test.sh)

if I run it from bash and cat /var/www/loger I get 12:29:09 AM

if I run it from sh I get the same.

If I stick that into crontab using crontab -e (*/1 * * * *
/var/www/test.sh > /dev/null 2>&1)  and cat /var/www/loger after
crontab has run I get 00:29:09

This also happens with  echo `date +%x` > /var/www/loger

executed from bash I get 10-03-20, but if executed via crontab I get
03/20/10 when I cat /var/www/loger


Why is this?


Sat, 20 Mar 2010 00:29:09 -0700

Ubuntu 9.04 jaunty
Linux 2.6.28-16-generic #57-Ubuntu SMP Wed Nov 11 09:47:24 UTC 2009
i686 GNU/Linux


Cheers,

Jesse Lloyd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]