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
-1
votes
1 answer

epoch time with decimals is wrong

A third party API is outputting: "1373762187.198" as a valid date time. When passed through PHPs date function, I get todays date even though I know the object its attached to is over a week old. Any ideas how todo a correct conversation?
azz0r
  • 3,283
  • 7
  • 42
  • 85
-1
votes
2 answers

Getting variable uninitialized in Perl using stat

I'm working on a script which shows the age of an existing file and then automatically delete it after about 4 hours of being there (presumed maintenance window). I've been trying to test my output with the stat function in Perl. We have multiple…
-1
votes
1 answer

bash script to convert epoch to standard in a text file

I work with several text files that use epoch, I would like a bash script that will scan a specific file for epoch and output another text document with it as standard time.
-1
votes
1 answer

PHP: Can't Convert MySQL DateTime to Epoch (with Correct Time of Day)

I'm grabbing a datetime from a MySQL database using php. In mysql the datetime looks like this: '2004-11-03 06:29:48' The line of my code that get the datetime from the database looks like this: $epochTime = strtotime($row[8]); Php's strtotime…
Lonnie Best
  • 9,936
  • 10
  • 57
  • 97
-2
votes
1 answer

Convert python datetime to custom epoch time

I need to convert datetime to a format where the whole number portion of the value (left of the decimal) counts the days since December 30, 1899. The fractional portion (right of the decimal) counts the time as a fraction of one day. For example,…
voviz
  • 1
  • 2
-2
votes
1 answer

load json data and display into datatable in flutter?

{ "status": done "msg": "Got all leaves", "data": [ { "_id": "63b26e351bc7d25e5b7a1ebb", "reason": "fever", "date": 1672511400000, "type": "tab1", "__v": 0 }, { "_id": 63b26fb91bc7d25e5b7a1ee8 "reason": "sick", "date": 1672511400000, "type":…
-2
votes
1 answer

epoch taking too long,

I have a good pc with good memory (intel core i7-11th gen, and 16gb of ram) still each of my epochs are taking about 1,5 hour, is it normal to take this long? from keras.models import Sequential from keras.layers import Dense from keras.layers…
-2
votes
1 answer

How do I remove the time portion from a epoch conversion in SQL

I am trying to get ride of the time portion of a conversion from epoch time to human readable form. Here is what the data output looks like currently: Ticket Number Created Completed 14111487 2/1/2023 1:36 AM 2/15/2023 6:00…
-2
votes
1 answer

SQLserver convert epoch date to date - error in conversion

I got the following SQL to work on my machine at home. At work when I try this I get "Arithmetic overflow error converting expression to data type int" (SELECT format(dateadd( second, Time, CAST( '1970-01-01' as datetime ) ), 'yyyyMMdd')) AS…
jeebee
  • 53
  • 8
-2
votes
1 answer

Epoch time difference when dates vary not showing correct value

SELECT r.order_id ,c.order_time ,r.pickup_time ,EXTRACT(epoch FROM (r.pickup_time - c.order_time) / 60) AS diff FROM runner_orders1 r JOIN customer_orders1 c ON c.order_id = r.order_id WHERE distance !=…
user2949241
  • 77
  • 2
  • 2
  • 12
-2
votes
1 answer

How to convert Java LocalDate to milliseconds

I am trying to convert a date formatted in yyyy-mm-dd to LocalDate to milliseconds with this code. LocalDate.parse("2022-08-01", DateTimeFormatter.ofPattern("yyyy-MM-dd")) …
Bitwise DEVS
  • 2,858
  • 4
  • 24
  • 67
-2
votes
1 answer

Convert date in words to epoch time stamp in python

I have a Dictionary in the following Format {'Date': ['May 22', 'Apr 22', 'Mar 22', 'Feb 22', 'Jan 22']} I need to convert the date values to epoch timestamps. How do I convert the data in this format to the epoch time stamp in seconds?
Mathew Pius
  • 65
  • 1
  • 7
-2
votes
1 answer

Converting from epoch date in javascript

I'm using an API in javascript that retrieves several information of stocks such as open, high, low and closing prices as well as date. However,this date is in epoch format (date: 1627047000, for example). How could I format this in this code so…
user139442
  • 91
  • 1
  • 11
-2
votes
5 answers

How to use sed to convert epoch to human readable date time

I tried use sed with /e option to call date -d @ to convert epoch to human readable date time but it seems that sed works only if the input line is very simple I prepared a bash file to simply convert epoch in my format and copied it in…
-2
votes
2 answers

SQL Server - Convert Epoch to datetime

I have a table that contains data imported in the epoch date format (exported from Influx , now stored as varchar(50)). I need to convert this to human readable datetime. I have tried SELECT [DATE],DATEADD(S, CONVERT(BIGINT, SUBSTRING([DATE],…