Questions tagged [unix-timestamp]
The number of seconds between a particular date and the Unix Epoch on January 1st, 1970
2,200
questions
0
votes
1
answer
8
views
Unixtimestamp convert in date Y-m-d H:i:s PHP
I have a date in Unixtimestamp (1100861208).
I am recovering it from an xml file and I have to write it in format (Y-m-d H: i: s) on the database.
How can I convert it?
i tried this way but it doesn't ...
1
vote
1
answer
17
views
Not able to filter time correctly in ElasticSearch query
The records which are saved in ES have a field called updated_at which stores time in epoch.
In my search query I'm filtering date based on 'yyyy-mm-dd' format as follows:
{
"query": {
...
0
votes
3
answers
33
views
Identify the files year wise and delete from a dir in unix
I need to list out the files which are created in a specific year and then to delete the files. year should be the input.
i tried with date it is working for me. but not able to covert that date to ...
0
votes
1
answer
36
views
is there a way to get the unix date and print out all the times of the day corresponding to that day?
In my executable file (tsk_gettimes), it prints out a unix timestamp with every piece of information it prints out in the terminal. I was wondering if there was a way that i could have the user input ...
-1
votes
1
answer
22
views
php timestring() fails to return correct result 4:00 PM
GOAL: Add X amount of seconds to existing time stamp (H:i:s) and convert it into a human readable non-military (24:00 Hr) AM/PM time stamp ('3:15 pm'). IF possible, I want to nix the leading zero in ...
0
votes
0
answers
12
views
When exporting facebook messenger data, is it possible to convert the filename into datetime?
I am not sure if this is even possible. I have used the export feature on FB to download Messages and all of the file names are basically a long string of numbers. I've searched all over the web to ...
0
votes
2
answers
53
views
Which time stamp format is this 1651928421543667000
I'm using an API and it returns timestamp as 1651928421543667000, I can't find the supported format I have tried using
strtotime()
datetime()
strftime()
in PHP any help? Thanks!
0
votes
2
answers
42
views
Is there a way to get the date from unix server?
I am pulling some data using VBA and the range where I need the date and time is like a huge number and it is not able to format as yyyy/mm/dd, it is like that: 1651680385.
I tried formula or change ...
1
vote
2
answers
68
views
Converting PySpark's consecutive withColumn to SQL
I need help in converting the below function into an SQL query:
start_time :- 1649289600
end_time :- 1649375999
test_data = df.withColumn("from_timestamp",to_timestamp(lit(from_unixtime(...
0
votes
1
answer
16
views
Filter SQlite unix timestamp data on hh:mm:ss part
I have the following records in my SQlite DB.
**SESSION** **DATETIME **BID** ASK**
25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240126 1979.74 1979.99
25e309b5-eecd-...
-1
votes
0
answers
27
views
How to show date and time [duplicate]
I'm a beginner, I have this code and I want to add one more column with date and time, which is stored in MySQL column “bantime”. The thing is that in MySQL bantime is stored as unix code like this ...
-2
votes
0
answers
56
views
Why the unix_timestamp is different between in typescript code and rust code?
I am building withdrawNFT function on solana devnet.
And I have a big error on get time functions on ts and rust. Here is the code and there is an amazing error.
Plz help me and answer how to modify ...
0
votes
1
answer
50
views
SQL Query - Unix timestamp - second newest date
I'm completely new to SQL and just need to create one query to be able to make a function on my blog and I'm taking small steps in the code, but I'm stuck on reciving the second newest unixtime date.
...
1
vote
1
answer
19
views
Python Convert UnixTimeStamp (with Minus) to Date
How i can convert UnixTimeStamp like -266086800 (with Minus) to date
>>> datetime.fromtimestamp('-266086800').strftime("%A, %B %d, %Y %I:%M:%S")
Traceback (most recent call last):
...
0
votes
1
answer
33
views
How to get the year, day, seconds, and milliseconds from a Unix timestamp (language agnostic)?
Not looking for the environment-specific date methods like this for calculating these date fields, but how do you isolate them from a Unix timestamp such as now, which was 1650045773120? It is in ...
0
votes
1
answer
29
views
bash script - how to get the time difference (in hour:minute:seconds) between two unix-timestamps
I need to get the time difference between two unix-timestamps in hour, minute, and seconds. I can get the different in minutes and seconds correctly but the hour is always wrong.
I have two unix-...
0
votes
1
answer
38
views
Azure Data Factory convert EnqueuedTimeUtc to Unix timestamp
I have a Data Flow that gets data from an EventHub.
The events have a system property called EnqueuedTimeUtc:
I want to convert the value of EnqueuedTimeUtc to Unix timestamp or at least to DateTime
...
0
votes
1
answer
25
views
Concatenate datasets that don't share timestamp values
I have two different csv files that correspond to a person's HRV (csv no1) and their emotions (csv no2). The first dataset used UNIX timestamps to capture the HRV values and the other recorded the ...
0
votes
1
answer
17
views
24h clock with from_unixtime
I need to transform a dataframe with a column of timestamps in Unixtime/LongType-Format to actual TimestampType.
According to epochconverter.com:
1646732321 = 8. März 2022 10:38:41 GMT+1
1646768324 = ...
0
votes
0
answers
42
views
Bash script to rename files with current timestamp
master_sheet_2022_03_25_1141.csv
master_sheet_2021_03_30_1034.csv
master_sheet_2021_03_31_1857.csv
master_sheet_2021_03_31_1930.csv
master_sheet_2021_03_31_2037.csv
master_sheet_2021_03_31_2109.csv ...
0
votes
1
answer
65
views
Unix epoch to date String – Slightly wrong month day
I am trying to format SystemTime as a String in Rust without using external crates, but I am facing a bizarre issue regarding the "day" field.
Can anyone explain me why the line preceded by ...
0
votes
0
answers
13
views
How can I convert from a date to unix in Safari? My current solution only works in chrome [duplicate]
The dateToUnix() function below is meant to return a unix timestamp given a date as the parameter (in the form of "YYYY.MM.DD").
function dateToUnix(date) {
return Math.floor(new Date(...
1
vote
1
answer
35
views
Assign values from Numpy Array to Pandas DataFrame based on almost matching unix timestamp
I am given a 2D numpy array and a huge pandas DataFrame. A dummy example of them would look somewhat like this:
arr = np.array([[1648137283, 0],
[1648137284, 1],
[...
0
votes
0
answers
62
views
restrict chat member, telegram bot nodejs unix timestamp
The problem is that I can't handle UNIX timestamp, to automatically unmute chat member.
The telegram API says that until_date has to be an integer so what I did took the Date().now() + 10000 to mute a ...
0
votes
2
answers
44
views
Getting a date in properties file in string format
I want to get a date from a key dynamically which will be used by java program to perform some tasks.
I have to get values from property file to java. cannot do vice versa
So basically the value for ...
0
votes
0
answers
50
views
Problems in UTC time (unix timestamp) convert to human readable format then merge the other data
I had used the API to get a data and then asign
to "sol_tvl_df" class.
from defillama import DefiLlama
import requests
import pandas
import ccxt
from math import sqrt
import time
import json
...
1
vote
1
answer
44
views
UTC Timestamp String to UNIX timestamp
I am currently working with a given time in the following format
"2022-03-21T12:14:28.725Z"
I want to compare this time I get from the internet to the local datetime.datetime.utcnow()....
0
votes
1
answer
71
views
Is it safe to use time.Now().Unix(), UnixNano(), UnixMilli() etc? What about integer overflow?
I read here https://pkg.go.dev/time#Unix that Unix() returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC
And you can also get the ...
0
votes
1
answer
35
views
Firebase query data of last 24 hour return same result
let before1day = new Date().getTime() - (24 * 3600 * 1000 );
const result = await this.firestore.collection(collection).doc(id).collection(subcollection).
orderBy('time').startAt(...
1
vote
2
answers
32
views
JS Date incrementation
Doing this without libraries.
dates.forEach((date) => {
if(date.getDay() == 6) {
console.log('sat', date)
var t = new Date()
console.log('sat new', new Date(t.setDate(date.getDate() + ...
0
votes
1
answer
28
views
how to add hours in python? in the format below:
how to add hours in python? in the format below:
hour1= '20:00'
hour2= '25:00'
sum= hour1 + hour2
so the correct print and formatted as I want it would be:
result of the sum 45:00:00
0
votes
0
answers
27
views
Mysql WHERE ... ORDER BY taking too long in large database
I have a large database.
There are 22 million lines for now, but there will be billions of lines in the future.
I have attached example lines where timestamp is in milliseconds.
What I want to do is ...
0
votes
1
answer
80
views
Dealing with Timezones and Unix Timestamp in Golang
Given the following code:
https://go.dev/play/p/moLVHXIc4ba
It shows the next result:
now: 2009-11-10 23:00:00 +0000 UTC m=+0.000000001 | inLoc: 2009-11-10 18:00:00 -0500 -05unix | now: 1257894000 | ...
1
vote
2
answers
34
views
find files where Change > Birth
Is it possible to find files where Change > Birth?
Stat somefile shows this for a modifed file
Access: 2022-02-24 17:07:45.562037727 +0000
Modify: 2022-02-24 17:07:26.682343514 +0000
Change: 2022-...
1
vote
1
answer
42
views
How to correctly append rows from a df to another based on timestamps on Python? Pandas related
I currently have 253 csv files with the following filenames:
1. ALICEUSDT-1h-2021-06-01.csv
2. ALICEUSDT-1h-2021-06-02.csv
3. ALICEUSDT-1h-2021-06-03.csv
4. ALICEUSDT-1h-2021-06-06.csv
5. ALICEUSDT-1h-...
0
votes
1
answer
92
views
Convert a string into date in AIX unix
I need to extract the date part from a file in unix and add +1 day to the date and rename the file with the new date in it.
for ex:
sample file name: sample_file_name_01_31_2022_14_01_45_loadid.csv
I ...
1
vote
1
answer
29
views
python gives invalid argument error on OS level
i have this piece of code:
symbol = 'PSTV'
end_point="https://api.polygon.io/v2/snapshot/locale/us/markets/stocks/tickers/"+symbol+"?apiKey=my_key"
a_json=requests.get(...
0
votes
0
answers
11
views
Separating List of unix times into separate nested list in C#
I have a list of unix times that looks like this:
List<long> unixTimes = new List<long>()
{
1635123603, // -> Monday, October 25, 2021 1:00:03 AM
...
0
votes
0
answers
48
views
Why do I need to divide the timestamp by 1 billion?
I'm using this public Postgres DB of NEAR protocol: https://github.com/near/near-indexer-for-explorer#shared-public-access
There is a field called included_in_block_timestamp whose "data type&...
0
votes
0
answers
18
views
How to fix year out of range error in converting unixtime to datetime? [duplicate]
from datetime import datetime
dt = datetime.fromtimestamp(1606145709000)
I got the following error:
File "/Users/con/tests/test.py", line 14, in <module>
dt = datetime....
0
votes
1
answer
22
views
How to get IST in Unix if my current timezone is UTC. Also I need to get the time format to be dd/mm/yyyy hr:min:sec? [closed]
I have just started learning about the date command in Unix.
I have typed the below code to get the IST. But I don't know how to convert it to a specific format.
TZ = IST-5:30 date
This gives the ...
0
votes
0
answers
16
views
how to pass inbuilt timestamp in gradle command on unix
if [ "$SIMULATION" == "all" ]; then ./gradlew clean build gatlingRun ; else ./gradlew :$MODULE:clean :$MODULE:gatlingRun-simulation.$SIMULATION -Dgatling.data.graphite....
0
votes
0
answers
17
views
how do i get the query which executed more time from a log file
I need the unix command to fetch out the query that got executed more than 1 sec from a log file using sed/awk. $11 is time stamp.
Pl suggest awk script to print all the query that executed more than ...
0
votes
1
answer
236
views
Python: convert timestamp to datetime
I have the following dataframe:
df=pd.DataFrame(index=[0])
df['timestamp'] = 1642104862000
df:
timestamp
0 1642104862000
I am applying the following code:
df['timestamp'] = pd.to_datetime(df['...
0
votes
0
answers
25
views
Saving the time in Django and running tasks later
I have a Django website where I store some data and will have to have certain tasks performed at a specific time.
I've done this before with model that looked like this:
start_at = models....
0
votes
1
answer
28
views
from_unixtime gave me an awkward value
Hi I used from_unixtime to convert this value 1632837232439 and I got 53712-07-21 01:53:59 is this right? I can't make sense of this, I used
df = df.select(from_unixtime(df_sixty60['createdOn']).alias(...
0
votes
0
answers
144
views
PyTorch Forecasting Dataloader/TimeSeriesDataSet with two differently scaled DataFrames (by unix) as Input/Output
I am trying to apply pytorch_forecasting.TimeSeriesDataSet from PyTorch Forecasting. My difficulty is, that I have two differently scaled & shaped DataFrames as input and output data.
Simply put, ...
0
votes
1
answer
25
views
How can I get 7 days before last 7 days using UNIX_TIMESTAMP?
I use the code below to return results from a mySQL field called registered_at so I can get the users that registered on the site the last 7 days and it works fine:
andWhere('registered_at > ...
0
votes
0
answers
35
views
Toast UI, Date Picker, Unix Timestamp, filter?
Is it possible to submit Unix timestamps to a column in Toast UI and filter them using the Date Picker feature?
Their example is simple enough:
{
header: 'Release',
name: 'release',
...