![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert Epoch time format to normal date time format in the same file | rk4k | Shell Programming and Scripting | 3 | 11-19-2008 10:04 PM |
| Help writing shell script in c++ format | deadleg | Shell Programming and Scripting | 2 | 03-07-2008 10:08 AM |
| Cron time format | new2ss | Shell Programming and Scripting | 1 | 09-12-2006 04:04 AM |
| is there any way to know how much time process was running from the moment it started | umen | UNIX for Dummies Questions & Answers | 2 | 04-03-2006 01:19 AM |
| Script to run 100jobs at a time from cron | skneeli | Shell Programming and Scripting | 2 | 03-22-2006 05:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I try to write a python script, which analyze user logon time with "who" command.
When i start script in bash, i get this result: USER=mnadmin tty7 2009-04-18 11:37 (:0) But when i start script in cron, i get result like this: USER=mnadmin tty7 Apr 18 11:37 (:0) I see - script have different environment in both cases, but i dont know where is time format defined... I want to get a time format like i get it in bash. Any ideas? |
|
||||
|
Yes! It is !
I add environment variable inside my script: os.environ["LANG"]="en_US.UTF-8" and now the time is in right format: USER=mnadmin tty7 2009-04-19 12:04 (:0) Thanks! |
![]() |
| Bookmarks |
| Tags |
| cron, format, python, time |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|