1,464 questions
0
votes
2
answers
100
views
Two-digit year error when converting string variable into date variable (dates span from 1962 to 1981) [duplicate]
I have a dataset that spans 1962 to 1981. The dates are formatted as a string in a single field like this: 15-Mar-62.
When I use the as.Date function to convert the field into a date format (so I can ...
1
vote
1
answer
111
views
Different epoch time from the same datetime
Here is my code:
import pandas as pd
import datetime
df = pd.DataFrame({'str_date': ['2023091004']})
df['epoch'] = pd.to_datetime(df['str_date'], format='%Y%m%d%H').astype(int) // 10**9
dt = ...
3
votes
0
answers
102
views
How to convert epoch to datetime in Datadog dashboard?
I have a Datadog dashboard displaying the metrics we get for our AWS Glue Zero-ETL integrations. One of those is lastSyncTimestamp, the epoch timestamp until which source has been synced to target.
I ...
2
votes
2
answers
279
views
How to get integer unix timestamps in python? Not casting float to integer
The float timestamp used in Python seems to be problematic. First, it will lose its precision as time goes on, and second, the timestamp is not usable, for example, storing in a database big integer ...
0
votes
0
answers
44
views
Stop automatic conversion of empty date values or null values to EPOCH in debezium
I am using mysql as the source database and Debezium mysql connector to get the values to kafka.
The issue is that there are SMT's written for date conversion but theres one specific case where the ...
0
votes
0
answers
30
views
In .yaml files for tracking algorithm, what is the use of the EPOCH parameter in the TEST section?
i am currently studying tracking algorithm such as Seqtrack, ARTrack and ODTrack, for the configuration I have found this .yaml file in the experiments folder : https://github.com/microsoft/VideoX/...
-4
votes
1
answer
61
views
Using epoch time in seconds to display days since epoch, years since epoch and hours, minutes and seconds in Python
import time
#Program is supposed to use epoch time to accurately display to
#user the amount of days since epoch, years since epoch and
#display the time hours, minutes and seconds.
epoch = time.time(...
0
votes
1
answer
87
views
Convert current date to an Uint8 array of bytes in little endian format
I'm trying to convert the current date to an Uint8 array of bytes in little endian format.
What I tried is this :
const epochSeconds = new Date().valueOf();
This works and returns the current date in ...
0
votes
1
answer
180
views
Issue with getLeaderSchedule RPC method in Solana when passing epoch parameter
Issue with getLeaderSchedule RPC method in Solana when passing epoch parameter
I'm trying to use the Solana JSON RPC API's getLeaderSchedule method to retrieve the leader schedule for a specific epoch ...
0
votes
2
answers
224
views
Work in Python with large date years without limitations of DateTime, epoch
I searched a lot about this issue and surprisingly I didn't find anything useful.
I made a program in Python inspired in relativity theory. A dilation time is calculated in seconds and then sums it to ...
0
votes
1
answer
72
views
How to access internal integer representation of timestamps in postgresql?
I want to access the integer representation of timestamps in postgresql from javascript, it seems postgresql drivers for javascript do not support the result-column format codes in the bind message. ...
0
votes
1
answer
177
views
Is the mktime64 implementation simple by pure coincidence or by design?
Background
Note: I previously posted this on Math Exchange (link), but it didn't meet the guidelines.
I came across the Linux Kernel's implementation for converting a Gregorian calendar date to a Unix ...
0
votes
0
answers
50
views
How to get the epoch time in eastern time? [duplicate]
How do I get the time in seconds since epoch of a python datetime in eastern time?
import pytz
from datetime import datetime, timedelta
et_tz = pytz.timezone('America/New_York')
initial_start_dt = ...
-1
votes
1
answer
56
views
Unix timestamp +1 hour replacement
I defined two helper methods in Python for setting start-time and end-time and want it converted into unix timestamp (epoch):
def set_epoch_start():
unix_epoch = datetime.utcfromtimestamp(0)....
-1
votes
1
answer
43
views
How to get/read moved file name in Jmeter from OS Process Sampler response
Vis OS Process Sampler in Jmeter. I am renaming one file with epoch and then moving that file to another location.
Operating system: Windows 10
tool to perform operations: PowerShell
i.e. TestFile....
1
vote
3
answers
400
views
Converting Date to epoch milliseconds
I have a Java Date (Fri Jun 28 10:00:01 GMT+01:00 2024) which I want to convert to Epoch millis to send to the backend.
I have tried the following:
typealias Dates = java.util.Date
fun Dates....
0
votes
0
answers
27
views
python datetime timezone converted is not really changing anything except the timezone label? [duplicate]
I am US/Pacific timezone (and my devices are too).
import time
import pytz
from datetime import datetime
from datetime import timezone
from zoneinfo import ZoneInfo
tz_pac = pytz.timezone('US/Pacific'...
1
vote
1
answer
100
views
Epoch Date With Angular
I am using epoch dates to convert to javascript Date object. My server stores the date in UTC and returns epoch in the response. My code does the following to change the epoch to a Date in angular
...
0
votes
1
answer
125
views
Using 4 characters to represent future Epoch time and compare to current day [closed]
I would like to ask for best practices or ways to improve my code for my very specific problem I am solving which involves taking a 4 character limited length string to represent a future date it ...
0
votes
0
answers
88
views
How to convert a timestamp from libgpiod to epoch date and time?
Using libgpiod version 1 with C++ bindings, I'm waiting for an event using event_read to get line event changes.
I understand that event comes with a timestamp in the std::chrono::nanoseconds format:
...
1
vote
1
answer
52
views
How do I convert an epoch into a datetime, taking into account the time zone?
Can Firebird 4 convert an epoch to a datetime taking timezone into account?
Example:
Time zone is CET (+01:00).
SELECT
EPOCH,
SUBSTRING(CAST(DATEADD(SECOND,CAST(EPOCH AS BIGINT),TIMESTAMP '1970-...
-1
votes
1
answer
752
views
What are all the known serialization formats of (unix) epoch time?
So, the basic definition of epoch time (similar to 'unix time', but not exactly: see below) and what it means is clear. However, nowhere on the wikipedia page or on any other resource I can find is it ...
0
votes
1
answer
254
views
Format Date and Time As Per User's Locale Settings using C++ Libraries
I want to extract date and time from an Epoch value and convert as per User's Locale Settings . There is already an existing solution using Windows API https://www.codeproject.com/Articles/12568/...
2
votes
1
answer
602
views
How can I get the maximum value for Instant#ofEpochSecond(?)
I just found that the Instant#ofEpochSecond(epochSecond) has minimum/maximum values.
Here comes the source codes.
// Instant.java
/**
* The minimum supported epoch second.
*/
private ...
0
votes
0
answers
44
views
How to properly index by (UNIX) day (epochDay) a denornmalized database
It is impossible to keep a UNIX "universal anchor" for days (LocalDate.now().toEpochDay()) like the way UNIX-time does, since the days of ALL the different regions heavily overlap on top of ...
0
votes
2
answers
116
views
Why elapsed time computed over large time windows have up to 100+milli second difference between System.currentTimeMillis vs System.nanoTime
I am trying to create a KSUID with microsecond precession sortable within same JVM, as currentTimeMillis give only Millisecond accuracy, thought of using currentTimeMillis() and nanoTime() together, ...
0
votes
1
answer
148
views
Why is Java epoch time off by 30 minutes when parsing via SimpleDateFormat
Somehow parsing date time strings and converting them to milliseconds after the epoch works differently in different environments. It would seem something is off with the timezone or something. In ...
2
votes
1
answer
99
views
Is there a bug in the .NET TimeSpan Class When Calculating TotalMilliseconds?
If I execute the following PowerShell script:
$> ([DateTime]"2023-10-16T16:56:14.052Z" - [DateTime]"1970-01-01T00:00:00.000Z").TotalMilliseconds
It gives the result (based on ...
0
votes
1
answer
279
views
Get current timestamp in microseconds in vxWorks
We have written a code to get current timestamp in microseconds. The same code is working proper in ubuntu with clang16 and C++. When we test the same code in vxWorks RTP (CMake build system) we get ...
-1
votes
2
answers
133
views
javascript converting datestring to epoch returns three digits too much
I am converting a string to epoch like this:
arrival = $('#aircraft_arrival_time').val();
console.log(arrival); //2023-12-09T14:03
temp = arrival.split("T");
arrivalDatePart = ...
0
votes
1
answer
121
views
Epoch class functionality
I am trying to make JavaScript code where I can put a <span class="epoch>(unix timestamp)</span> and it will set it to the timestamp in the user's timezone.
So far I have this code:
...
1
vote
0
answers
110
views
Get current bash epoch
So I made a bash script to ssh onto lots of computers and play a sound all at once.
I'm running into issues when trying to sync them though.
My approach is:
Get current epoch on my computer,
Add a 20 ...
0
votes
1
answer
825
views
Postman change unix time in microseconds to datetime
I have a JSON response which includes unix timestamp in microseconds. I want to either:
a. Add a field to the response so that it shows the date+time; or
b. Change the field itself to be date+time.
...
0
votes
1
answer
119
views
Subtracting timestamps with different timezone oracle [duplicate]
I am trying to subtract two timestamp columns from each other. One of them is in Asia/Jerusalem and the other one is in utc. I was wondering in which time zone am I gonna get the results.
I am doing ...
2
votes
2
answers
289
views
Converting Epoch to EST, off by an hour?
I'm trying to convert an epoch into a human friendly date-time. I'm off by 1 hour. Why?
$aptTime = 1694194200;
if(!empty($aptTime)) {
$aptDisplay = new dateTime("@$aptTime");
...
0
votes
1
answer
146
views
How to find end of the day using epoch time and zone in Java
I have the epoch time of an event, as eventTime in seconds and the zone (location of the event) as userZone.
I need to check if an event is eligible. An event is only eligible if it happens before the ...
0
votes
1
answer
923
views
How do I use std::chrono to extract time units out of epoch time?
I get the epoch time in ms from my API and would like to extract the year, month, etc. from it (also compare two dates, add hours/days/months, etc.).
I have watched Howard Hinnant "A chrono ...
2
votes
2
answers
358
views
Converting string date to utc epoch in Python
I have a UTC time as string, I want to convert it to UTC timestamp. But following code seems to again convert it to UTC causing it to be wrong timestap. How do I convert that datetime format to ...
0
votes
1
answer
485
views
Word2Vec' object has no attribute 'iter'
# train word vectors
w2v_model.train(sentences, total_examples=w2v_model.corpus_count, epochs=w2v_model.iter)
i got this error
AttributeError: 'Word2Vec' object has no attribute 'iter'
Could you give ...
0
votes
1
answer
148
views
Asterisk strftime %B
I want to record calls with mixmimonitor and save it with this format of the filename - %d-%B-%Y-%H:%M:%S.wav
%B - is the full month name (July for example) - it works, but I get the name of the month ...
0
votes
1
answer
90
views
Convert normal date and time to epoch time and vice versa using clang compiler
I want to convert normal date and time to epoch time and vice versa using clang compiler.
I have C++ code which works properly with g++ but doesn't work with clang++.
I think it strptime and strftime ...
0
votes
1
answer
258
views
Convert epoch time to datetime within JSON query not working in Ansible
I have a list of dictionaries and for all items in this list, I want to convert one key-value pair epoch time to datetime but I'm getting an error
"JMESPathError in json_query filter plugin:\...
0
votes
1
answer
27
views
From milli timestamp to epoc time in bash
I need to convert milli sec timestamp to epoc timestamp
this is a date till millisec : 20230621171905443
I tried below :
date -d "${D:0:8} ${D:8:2}:${D:10:2}:${D:12:2}:${D:14:3}" +'%s.%3N'
...
1
vote
1
answer
564
views
PostgreSQL: how to concat + convert Unix epoch timestamp to date + time
I have a column with a timestamp. The converted column gives me a datetime value starting from the year 1975. That means I should concat() that value with '0' and convert it to the correct datetime.
I ...
-1
votes
1
answer
91
views
Date in INT but it's not epoch time
I have '77337' and '4477877' delcared as INT in a client's database in SQL Server.
Their app displays the following date and time as 9/24/2012 and 12:26 respectively.
How were these computed?
From the ...
0
votes
2
answers
1k
views
How to inject a timestamp when recording a ssh session?
I have been utilizing this command line to secure shell into a host computer and record the session terminal and direct it to an associated .txt file.
ssh -t dobby1997@${IP} "script -t 2> ...
0
votes
1
answer
152
views
Working with shell scripts on hp-ux and need to convert time to epoch using date command. How to solve bad format character -s error?
To Work on few shell scripts and I need to get the time in terms of epoch in hp-ux
I tried using
date +%s
but i got bad format character - s error
i am allowed to use -u and -a options with date ...
0
votes
1
answer
274
views
Epoch time in microseconds
Is it possible to obtain epoch time in microseconds?
I am unable to find if there is any configuration to apply to get epoch time in microseconds.
I am trying to find operational time required by my ...
0
votes
2
answers
457
views
How to convert current date time into time zone format using PowerShell?
I am trying to convert the current date time into the format "2023-05-25T09:51:55" using time zone Central European Time using PowerShell but getting below error.
**Exception calling "...
1
vote
1
answer
93
views
Different results in different epochs
Why we get different results(weights) while using multiple epochs also we use the same data in each epoch? What is happening in each epoch? Is each epoch use the previous weights?...