Python Forum
Batch job from epoch to human time
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch job from epoch to human time
#1
Hi everyone, pretty new to python. I am a voice engineer by trade, but am trying to learn, as automation is huge in my field. That being said here is my question. I have a report that dumps out data in epoch time. I have utilized this code to get it translated properly to CST. Although, with a report that has 5200 of these, wondering if there is a batch way to run this for all?

>>> import time
>>> epoch = 1515998448
>>> time.strftime("%a, %d %b %Y %H:%M:%S %Z", time.localtime(epoch))
'Mon, 15 Jan 2018 00:40:48 Central Standard Time'
Any help is greatly appreciated!

thanks,

Jeff
Reply


Messages In This Thread
Batch job from epoch to human time - by jheeman - Feb-07-2018, 09:36 PM
RE: Batch job from epoch to human time - by Larz60+ - Feb-07-2018, 09:50 PM
RE: Batch job from epoch to human time - by jheeman - Feb-08-2018, 03:18 PM
RE: Batch job from epoch to human time - by Larz60+ - Feb-08-2018, 07:20 PM
RE: Batch job from epoch to human time - by jheeman - Feb-20-2018, 10:24 PM
RE: Batch job from epoch to human time - by Larz60+ - Feb-20-2018, 10:59 PM
RE: Batch job from epoch to human time - by jheeman - Feb-27-2018, 10:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] Epoch timestamp without milliseconds? Winfried 5 3,322 Jan-27-2023, 04:35 PM
Last Post: deanhystad
  Human Sorting (natsort) does not work [SOLVED] AlphaInc 2 1,238 Jul-04-2022, 10:21 AM
Last Post: AlphaInc
  batch file for running python scipt in Windows shell MaartenRo 2 2,031 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  sorting alphanumeric values in a human way idiotonboarding 3 2,747 Jan-22-2021, 05:57 PM
Last Post: idiotonboarding
  Stumped by my own code (ratio & epoch-time calculation). MvGulik 2 2,225 Dec-30-2020, 12:04 AM
Last Post: MvGulik
  How to run script from batch file? jmair 1 4,420 Oct-12-2020, 04:29 PM
Last Post: jmair
  python script to Batch File biprabu 1 2,124 Sep-09-2020, 01:49 PM
Last Post: jefsummers
  Writing a function to calculate time range in Unix Epoch Time t4keheart 2 3,133 Jul-15-2020, 01:55 AM
Last Post: t4keheart
  changing code to work on a batch of images within a folder Afrodizzyjack 2 2,146 May-12-2020, 08:56 PM
Last Post: Afrodizzyjack
  Parse Binary Data File and convert Epoch Time drdevereaux 1 3,307 May-16-2019, 01:56 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020