Skip to main content

All Questions

0 votes
2 answers
50 views

pandas date column to unix timestamp accounting for timezone and varying datetime formats

I have multiple data frames with a datetime column as a string. Datetime formats vary across columns in the dataframe or across dataframes. I want to get a unix timestamp that gets interpreted by an ...
Ted M.'s user avatar
  • 380
0 votes
1 answer
37 views

How can I calculate the Unix time taking into account the time zone?

Example: SELECT SESSIONTIMEZONE, DT, TRUNC( (DT - date '1970-01-01') * 86400) AS EPOCH_DT FROM "test_table" outputs SESSIONTIMEZONE DT EPOCH_DT Europe/Paris 1970-01-02 00:00:...
sid_com's user avatar
  • 24.9k
1 vote
0 answers
101 views

Time difference problems when using FROM_UNIXTIME() - localhost vs. server - php / MySQL

I am trying to create an appointment booking system for a hairdresser. The conception is that they open at 9:00 and close at 15:30. This is my timeframe. Steps of booking: choosing the service (it ...
gyeprefosch's user avatar
0 votes
3 answers
640 views

Convert unix time to UTC date/time in PHP

The UTC day 2022-12-11 starts at unix time 1670716800 (which is obviously divisible by 24*3600). In PHP, I can convert it from left to right this way: $Date = "2022-12-11"; echo strtotime ($...
Kolodez's user avatar
  • 615
1 vote
1 answer
670 views

Get Epoch/ Unix timestamp from Zoned Datetime in Java

I have to convert the birth date of people born in USA to Epoch and store it in database. Right now I am getting birth date from a legacy system in two different formats: yyyy-MM-dd HH:mm:ss & dd-...
Ram's user avatar
  • 1,417
0 votes
0 answers
202 views

Why do I need to set a timezone for my server, but not using Unix Timestamp?

I am a newbie to backend and creating a backend server that handles multiple countries' data. Some countries have a daylight saving issue that requires us to correct timezones twice a year regarding ...
Thanh Nhật's user avatar
-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
0 votes
0 answers
25 views

Local time to unix datetime conversion failing

import datetime import pytz time_zone=pytz.timezone('America/Chicago') a=datetime.datetime(2019,1,1,0,0,0,tzinfo=time_zone) b=datetime.datetime.fromtimestamp(a.timestamp(),time_zone) print("The ...
csamudio's user avatar
0 votes
1 answer
803 views

setting timezone for timestamp in angular

Hello guys i looked the internet and here but i couldnt find the solutuon , anyway here is my problem. I have a date and I need to convert this date to timestamp, but I need to do this according to ...
atacan erdoğan's user avatar
0 votes
2 answers
509 views

Powershell string to unix time with correct timezone

I'm collecting a timestamp value and trying to transform it to a Unix format. To do that, I'm using ParseExact method, like so: $FILETIME = "20220709101112" $EPOCHTIME = [datetime]::...
markfree's user avatar
  • 183
0 votes
1 answer
209 views

Convert time zone date column to timestamp format

I have column containing dates in format as seen here.... 2021-09-02 06:00:10.474000+00:00 However, I need to convert this column into a 13 numbered timestamp. I have tried... df['date_timestamp'] = ...
Diop Chopra's user avatar
0 votes
1 answer
297 views

How to convert Unix timestamp to local date in Oracle?

Internet, Please help! I am using Oracle DB v 12c, where invoice issuing time is stored as unix timestamp in column of type NUMBER + there is also a VARCHAR2(128) column, which defines the timezone ...
Jansen's user avatar
  • 152
1 vote
1 answer
369 views

How to convert a unix time to GMT+8 human readable date without FROM_UNIXTIME() function?

Since mysql Generated Column can't use FROM_UNIXTIME() as generate sql, how can I convert a unix time to GMT+8 human readable date? My failed example: ALTER TABLE just_a_table ADD COLUMN ...
DaveICS's user avatar
  • 47
1 vote
1 answer
551 views

Python3.7 datetime.timestamp() returns a wrong value by two minutes (???) [duplicate]

If I have this code: import datetime import pytz dt = datetime.datetime( year=2021, month=3, day=3, hour=11, minute=30, second=15, microsecond=0, tzinfo=pytz.timezone(&...
RebeeStill's user avatar
3 votes
0 answers
688 views

Flutter/Dart - Why does DateTime.toLocal() behave differently for dates before 01.01.1970 UTC aka UNIX timestamp 0?

Using .toLocal() on DateTimes before 01.01.1970 (thus with a negative UNIX timestamp) seemingly results in the timezone information getting lost. final DateTime date1 = DateTime.parse('1970-01-01T00:...
Stacky's user avatar
  • 895

15 30 50 per page
1
2 3 4 5 6