How to find the UNIX timestamp for a specific HH: MM time given the UTC offset in PHP?

I have a list of UTC offsets as integers in seconds. For example, -36000 in -10 hours. How to find the UNIX timestamp, for example, at 10:00 p.m. in a place with this offset in PHP.

PS: This is not homework

thanks

+4
source share
1 answer

new DateTime ($ yourTimestamp, new DateTimeZone ('UTC'));

should be good

-one
source

Source: https://habr.com/ru/post/1396748/


All Articles