I have to set up a time command for my friend (using twitch's nightbot) and can't figure out how to print the current time.
I've tried using this:
<?php
$date = date_create(null, timezone_open('America/Los_Angeles'));
$tz = date_timezone_get($date);
echo date(" H:i", time());
?>
This however returns the current server time (I'm fairly certain) instead of the timezone I selected.
I've used several different things but none of them work. They either display nothing, or display the wrong time.