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
5
votes
2 answers

Create an integer timestamp in Firebird

I need a timestamp as an integer (please DON'T ask me why, I'm totally bothered by this). The definition is the number of seconds after 01.01.1970 as usual. What I have as an inital value is a string with the format YYYYMMDDHHMMSS (e.g.…
confusedandtired
  • 139
  • 1
  • 12
5
votes
1 answer

Convert any epoch to human readable format for system timezone

This answer explains how to convert any given epoch to a non-localized datetime. This answer explains how to convert the epoch for right now to a human readable format for a pre-defined timezone. This answer explains how to get the current system…
Chris Redford
  • 16,982
  • 21
  • 89
  • 109
5
votes
1 answer

How to calculate epoch day?

Is calculating the epoch day as simple as taking the epoch seconds and dividing by 86400? Or are there some special calculations that need to be done to take account of daylight savings or leap year or some other factor? Update: by "epoch day" I…
Duke Dougal
  • 24,359
  • 31
  • 91
  • 123
5
votes
3 answers

Epoch Time (Ticks since 1970) - Mac vs. Windows

I have some C# web services that return JSON. The .NET JavaScriptSerializer returns dates in Epoch Time (milliseconds since 1970). On any Windows machine, the web based application processes the milliseconds back into the proper date without a…
kwcto
  • 3,494
  • 2
  • 26
  • 33
5
votes
3 answers

why Unix Time Stamp for same time is different in different timezone

Why 7/18/2013 11:33 is different in GMT timezone and in my local Time Zone (Asia/kolkata)? As Unix time-stamp are the ticks being calculated since epoch time 1/1/1970 00:00:00 GMT so i know that there the epoch time had occurred at different…
Dinkar Thakur
  • 3,025
  • 5
  • 23
  • 35
5
votes
2 answers

Conversion from milliseconds to Unix Timestamp from different times gives same result

I have two variables: tempTimeRequests timeLastUpdateRequests Both are given in milliseconds since epoch. I'm facing a bizarre behaviour from js: the result I get for alert( tempTimeRequests+"\n"+ timeLastUpdateRequests+"\n"+ …
DanielX2010
  • 1,897
  • 1
  • 24
  • 26
5
votes
1 answer

Pymongo returning incorrectly when using "$gte" and "$lte"

I'm attempting to select from mongo (using pymongo), querying against epoch timestamps. A sample from my database is (pruned for brevity): { "_id": "", "tweet": { "iso_language_code": "en", "to_user_name": null, …
mr-sk
  • 13,174
  • 11
  • 66
  • 101
5
votes
1 answer

String to Date in epoch time Format in Java

i have a string in a format i don't really recognize: string received: "36872 Dec 12 15:35" while the windows representation for this date is: "12/12/2012 5:35 PM" so first, I'm guessing something was corrupted in the date. second, I'm looking to…
Elad
  • 53
  • 1
  • 4
5
votes
2 answers

is epoch time the same on the same machine with diffent scripts/programs

I want to use shell to get epoch time and later use javascript on a html page to get another epoch time and then get the difference between them but I'm afraid that the epoch time may not be synchronized among different scripts so this difference is…
user1769686
  • 505
  • 2
  • 10
  • 16
5
votes
2 answers

Google spreadsheet - how to determine timezone using function

How to use a formula to determine the current timezone? The formula I use gives an unexpected result. My spreadsheet settings (File > Spreadsheet settings...): Time zone: (GMT+01:00) Amsterdam The formula I used: =TEXT(NOW(),"HH:mm z") This…
wivku
  • 2,457
  • 2
  • 33
  • 42
5
votes
1 answer

Convert Epoch Date to meaningful Javascript date

I am getting a string value "/Date(1342709595000)/"in the JSON. I am trying to extract the digits alone and convert the epoch date to meaning ful Javascript Date in the format mm/dd/yy hh:mm:ss . I was able to achieve the first part of the question…
Ravi
  • 3,132
  • 5
  • 24
  • 35
4
votes
1 answer

What will happen when seconds since epoch > LONG_MAX?

For homework, I am writing a program that deals with a lot of time_t objects. I thought about checking them for overflow, but then it occurred to me that if they overflowed we would all be in a might bit of trouble. Is there a plan for this? What…
Ziggy
  • 21,845
  • 28
  • 75
  • 104
4
votes
3 answers

DB2 timestampdiff function returning unexpected results

I'm using the following syntax TIMESTAMPDIFF(2, CHAR(CREATED - TIMESTAMP('1970-01-01 00:00:00')) where CREATED is of type TIMESTAMP and the database is DB2. The intension is to get the timestamp converted to millis from epoch. If there is a better…
Manoj
  • 5,542
  • 9
  • 54
  • 80
4
votes
6 answers

How do I convert a date into epoch time in Perl?

Solaris 10 doesn't seem to like me a lot. I am trying to run a simple script to accept date and return epoch of that date: #!/usr/bin/perl -w use strict; use Time::ParseDate; my $date1 = "Mon Mar 27 05:54:08 CDT 2009"; #Convert to seconds since…
pavanlimo
  • 4,122
  • 3
  • 32
  • 47
4
votes
2 answers

Is there any function in hive that converts epoch time to standard date?

to_date function takes this "1970-11-01 00:00:00" as an input and returns "1970-11-01". But I have epoch time as an input. How do I convert it to standard date format? There is a function to convert standard date to unix epoch time but not the other…
priyank
  • 4,634
  • 11
  • 45
  • 52