Questions tagged [epoch]

Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds. This tag is *not* for epochs as used in neural networks/machine learning.

Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.

It is used widely, not only in Unix-like operating systems, but also in many other computing systems and file formats.

It is neither a linear representation of time nor a true representation of UTC (though it is frequently mistaken for both), as it cannot unambiguously represent UTC leap seconds (e.g. December 31, 1998 23:59:60), although otherwise the times it represents are UTC.

Unix time may be checked on some Unix systems by typing date +%s on the command line.

1440 questions
6
votes
3 answers

DateTime, the Epoch and DocumentDb

So I read this very interesting blog on working with datetime in Azure DocumentDb. The problem being that, right now, Azure DocumentDb does not support range search on datetime fields. The reason for that is that DocumentDb is based on json and that…
Gerben Rampaart
  • 9,853
  • 3
  • 26
  • 32
6
votes
2 answers

How do I convert epoch time to normal time in Perl?

I am attempting to write a Perl script that parses a log where on each line the second value is the date. The script takes in three arguments: the input log file, the start time, and the end time. The start and end time are used to parse out a…
Matt Pascoe
  • 8,651
  • 17
  • 42
  • 48
6
votes
2 answers

Converting string date to epoch time not working with Cython and POSIX C libraries

I have a very large pandas dataframe and I would like to create a column that contains the time in seconds since the epoch for a ISO-8601 format date string. I originally used the standard Python libraries for this but the result is quite slow. I…
dsimmie
  • 189
  • 1
  • 2
  • 14
6
votes
1 answer

Epoch Timestamp String to Joda Datetime using ONLY String Formatter

Assuming I have a timestamp "1355409000003" as a String, is there a way to specify a DateTime format that parses that into a Joda DateTime? I.e., I can parse "12/01/2012" with format "MM/dd/YYYY" and "2012-12-01 04:27" with "YYYY-MM-dd HH:mm", but…
mathematician
  • 1,942
  • 5
  • 19
  • 22
6
votes
2 answers

How to convert epoch to readable dates in Angular to use in Chartist

Here I'm getting an array of date/time epochs ApiFactory.getTweetQuotes(the_ticker).then(function(data) { // Create epoch array: for (var i = 0; i < data.data.quotes.length; i++) { …
Leon Gaban
  • 36,509
  • 115
  • 332
  • 529
6
votes
2 answers

jQuery Datepicker - How can I format the date as an epoch timestamp (in seconds NOT milliseconds)

I'm using the jquery datepicker plugin to set a date field that is stored as an epoch timestamp in the db (the field, publish_time, maps directly to the table schema). It seems that Datepicker only supports epoch in milliseconds, and not seconds.…
John Himmelman
  • 21,504
  • 22
  • 65
  • 80
6
votes
2 answers

Timestamp to Epoch in a CSV file with GAWK

Looking to convert human readable timestamps to epoch/Unix time within a CSV file using GAWK in preparation for loading into a MySQL DB. Data Example: {null};2013-11-26;Text & Device;Location;/file/path/to/;Tuesday, November 26 12:17…
Keiron
  • 117
  • 1
  • 8
6
votes
3 answers

Epoch or Unix Time - Long.MAX_VALUE Human Readable Date

If stored in milliseconds, what is the human readable date for the value dateTime? Epoch is Thursday, 1 January 1970, and I mean long as in Java long. long dateTime = Long.MAX_VALUE; All the online tools seem to crash when I give them a value this…
Marc M.
  • 3,631
  • 4
  • 32
  • 53
6
votes
2 answers

Epoch Seconds to Date Conversion on a Limited Embedded Device

I am trying to figure out the best way to convert from epoch seconds (since NTP epoch 1900-01-01 00:00) to a datetime string (MM/DD/YY,hh:mm:ss) without any libraries/modules/external functions, as they are not available on an embedded device. My…
swolpert
  • 151
  • 1
  • 7
6
votes
3 answers

Use Unix timestamp in Doctrine Timestampable

How do I use Unix timestamps with the Doctrine Timestampable behavior? I found the following code snippet here, but I'd rather not manually add this everywhere: $this->actAs('Timestampable', array( 'created' => array('name' => 'created_at', …
tt
5
votes
2 answers

Conversion of unix epoch time to windows epoch time in python

Quick question: Is there a pythonic (whether in the standard libraries or not) way to convert unix 32-bit epoch time to windows 64-bit epoch time and back again?
user1040625
  • 403
  • 1
  • 4
  • 11
5
votes
2 answers

How can I convert epoch time to date and time in Java?

I need to convert epoch timestamp to date and time. I have used the following code to convert but it converts to a wrong date, year and time. String date = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss") .format(new java.util.Date…
arnp
  • 3,178
  • 6
  • 26
  • 43
5
votes
3 answers

Python datetime to microtime

I've looked all around, and there seem to be a lot of hacks, but no simple, "good" ways to do this. I want to convert a Python datetime object into microtime like time.time() returns (seconds.microseconds). What's the best way to do this? Using…
Taj Morton
  • 1,588
  • 4
  • 18
  • 26
5
votes
4 answers

Save history of model.fit for different epochs

I was training my model with epoch=10. I again retrained with epoch=3. and again epoch 5. so for every time i train model with epoch=10, 3, 5. I want to combine the history of all the 3. FOr example, let h1 = history of model.fit for epoch=10, h2 =…
Sravan Kumar
  • 602
  • 8
  • 22
5
votes
1 answer

Calculate the difference in seconds between two epoch timestamps in Javascript

I'm trying to calculate the difference (in seconds) between two EPOCH timestamps using Javascript. I have two timestamps: START: 1565628094441 END: 1565714527812 Both timestamps were obtained using: var time = new Date().getTime().toString(); I…