Skip to main content

All Questions

-2 votes
1 answer
206 views

How can I convert a day, DD-MM-YYYY HH:MM:SS +XXXX to unix time in Python?

I'm working with a timestamp that is formatted Thu, 04 Jan 2024 18:25:01 +0000 but I need it in Unix time. I've looked at several library functions and cannot figure out how I can achieve this. How ...
Jean deBaer's user avatar
0 votes
0 answers
12 views

Removing "01" Prefix from Timestamps in Plot in Python

I am currenlty working on a plot containing two sets of data and fitting linear regression to them. I have a problem with timestamps that i need to have in UTC on the plot (originally in unix). I ...
Edvaeli's user avatar
  • 11
1 vote
0 answers
108 views

python3 how to convert timestamp with timezone to int? like b'1664348567 +0000'

I want to change b'1664348567 +0000' to int and compare date. I don't know how to convert this timestamp.
gekson's user avatar
  • 99
-1 votes
1 answer
49 views

Convert 2022-10-14T23:59:59-07:00 into unix time with spefcific dynamic timezone

Can someone please help me to write the python code to convert 2022-10-14T23:59:59-07:00 into unix time with dynamic timezone and also I want to know what does that -07:00 at the end indicates.
Kritik Alawat's user avatar
2 votes
1 answer
190 views

Newlines in X Axis in Matplotlib Cause Undesired Window Resizing/Jumping/Flickering Behavior

I am plotting dates and times on the x axis in matplotlib. Because I want to plot as many labels as possible, I am using newlines in the x labels like so: Unfortunately, this has the side effect of ...
EllipticalInitial's user avatar
1 vote
1 answer
502 views

How to get pyqtgraph to recognize unix milisecond timestamp as x axis?

I'm finally getting towards the end (sort of) of a two month long effort to replicate a candlestick chart in PyQt5. Other than the annoyance of setting proper view bounds for scrolling I need to more ...
thatoneguy's user avatar
0 votes
0 answers
132 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 ...
Steven's user avatar
  • 1
1 vote
1 answer
302 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-...
NoahVerner's user avatar
-1 votes
2 answers
115 views

Is there any function, what can get a first value of the day and skip the values of the same day in Python?

I've a json file, whats include many values by different time, such as 05-01-2020 19:04:27. The time has also a specific value for example 05-01-2020 19:04:27. 3503.443. How can I get a single value ...
Jarno Heinonen's user avatar
0 votes
0 answers
14 views

Format and sort a complex Python list [duplicate]

I’m new to Python and have been struggling to find any resources on how to perform the below. I’m confident that my data set is a list as wrapping the variable which contains it with print(type(...
Usul's user avatar
  • 46
0 votes
0 answers
56 views

I want to know how to just use the date portion of the Unix timestamp. I have left blank the portion I am having trouble trying to figure out

I am lost as to how to turn the time stamp into a formal date and how to format it. import os import datetime def file_date(filename): # Create the file in the current directory with open(...
Terrance Ransby Sutton's user avatar
0 votes
1 answer
70 views

calculating date differences with datetime python

Example code: from datetime import datetime, date from dateutil.relativedelta import relativedelta import time timestamp = 1620013967000 cunix = int(time.time()) ounix = timestamp / 1000 outc_time =...
humid's user avatar
  • 23
2 votes
2 answers
206 views

How to convert string datetime to UTC UNIX?

I have date in the as string in the following format: 202001010000 I am trying to convert this to UNIX format and get the result in UTC I did: import datetime stime = "202001010000" print(...
reinhardt's user avatar
  • 2,103
1 vote
1 answer
25 views

Unix millisecounds in date

im working on small project and i need to display date from api , api uses millisecounds and i cant really find a way to get date without time. So far i didnt find anything usefull on internet. Code i ...
Pewi's user avatar
  • 11
0 votes
1 answer
384 views

Batch renaming wave audio files with their time stamp info

I have approximately 60 audio files with a partial time stamp in their names. These names were created automatically by the recording system and are shown as below 201106_0099.wav 201106_0100.wav ...
Mario Rollo's user avatar

15 30 50 per page