Re: Date2Epoch script

2011-06-13 Thread MRAB
On 13/06/2011 14:03, miguel olivares varela wrote: > Hello > > i try to create a script to convert a date "mmddHHMMSS" as an UNIX timestamp. This is an example of my log file > > cat /tmp/test.log > 20110612112233 > 20110126145535 > 20110126185500 > > here is my code: > > #! /usr/bin/pyth

RE: Date2Epoch script

2011-06-13 Thread miguel olivares varela
()while line_log:timestamp=int(time.mktime(time.strptime(line_log, "%Y%m%d%H%M%S"))) Miguel Date: Mon, 13 Jun 2011 07:19:54 -0700 From: gher...@islandtraining.com To: klica_...@hotmail.com Subject: Re: Date2Epoch script On 06/13/2011 06:

Date2Epoch script

2011-06-13 Thread miguel olivares varela
Hello i try to create a script to convert a date "mmddHHMMSS" as an UNIX timestamp. This is an example of my log file cat /tmp/test.log201106121122332011012614553520110126185500 here is my code: #! /usr/bin/python import osimport sysimport globimport reimport time dir_log = "/tmp"#loop to