skip to Main Content

Php – 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"); $aptDisplay->setTimezone(new DateTimeZone('EST')); $aptStr = date_format($aptDisplay, "l F jS a\t g:i A"); $html = '<p…

VIEW QUESTION

IntCalendar outputting wrong locale in php

I have the following code which I believe should output fr_FR as the locale but for some reason is outputting en_US_POSIX (it does this on any timezone). What have I done wrong? $loc = IntlCalendar::createInstance(new DateTimeZone('Europe/Paris')); echo $loc->getLocale(Locale::VALID_LOCALE); For refs:…

VIEW QUESTION
Back To Top
Search