Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

changing date on server

Featured Replies

You never explained why you want to do this. Apache obtains its time reference from the PC clock. In theory you could change the PC clock hence change Apache time. It is neither desirable nor a good idea to do this, will cause havoc with other programs.

 

If all you want to do is change-displayed time to a user use PHP for example:

Save this as test.php it effectively locates your server in a different time zone, however in reality it is referenced to your PC time.

 

<p>Display local time</p>
<?php print  date("H:i") ?>

<p>Display time difference + 5hours</p>
<?php
$diff_to_localtime=5;
$new_var=date("U")+$diff_to_localtime*3600;
print date("H:i", $new_var);
?>

<p>Display time difference - 5hours</p>
<?php
$diff_to_localtime=5;
$new_var=date("U")-$diff_to_localtime*3600;
print date("H:i", $new_var);
?>

<?php
putenv("TZ=America/Chicago");
?>
<p>Display local time America/Chicago </p>
<?php print  date("H:i") ?>
<br>


<?php
putenv("TZ=Australia/Melbourne");
?>
<p>Display local time  Australia/Melbourne</p>
<?php print  date("H:i") ?>
<br>

 

If you want to do is echo their local time use a small JavaScript to pick up there local PC time.

 

Not sure if that’s of any help

All the best

Ric :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.