date format on lpstat output
Kurt Pfeifle
k1pfeifle at gmx.net
Thu Aug 23 08:08:52 PDT 2007
Amy Tanner wrote:
> I'm having a problem with a cron job I'm running. I narrowed it down
> to the fact that when I run lpstat -o as root, the date/time column
> is in a different format than when the job is run from cron.
Which are the two formats?
Can you post examples?
Which is the output of your "locale" command?
Is it different for a user and for root?
Which is the user that your cron job script is running as?
> Is there
> some environment variable lpstat is using to determine in which format
> to output that date/time column.
You can experiment with setting the LANG, LC_TIME and/or LC_ALL env
variables on the commandline:
LC_TIME="C" lpstat -W completed | tail
LC_TIME="en_US" lpstat -W completed | tail
LC_TIME="de_DE.UTF-8" lpstat -W completed | tail
[....]
Once you find the output that you like, put that variable into your
cron job script.
> Thanks!
Cheers,
Kurt
--
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH ..................... Hedelfinger Strasse 58
A RICOH Company ........................... D-70327 Stuttgart/Germany
More information about the cups
mailing list