Change Server Time?

free web hosting
Free Web Hosting > Advanced Free Professional Web Hosting > Hosting Support & Help

Change Server Time?

Feelay
Hey!

I was wondering..
Is it possible to chnage the server time for my website? Or is it the same time for all servers?

Thanks //Feelay


Reply

yordan
I guess that the server time is the local time for the city where the server is physically located.
Of course, like in my forum, the time seen by the user is the user's PC local time.

Reply

Feelay
oh? what code can I use to do that (php please:P)? because my site is showing the time like "06:02:19" when it is "15:21"

Reply

Quatrux
if you're using PHP and if the server supports PHP5, you can always set the the timezone and as I know you even can get an error if you're using date functions and didn't set it, here is the function: http://www.php.net/date_default_timezone_set

on PHP4 you couldn't do that, instead it was using the server time, but that was easy to avoid, when you know where the server is or even you don't know, you can just get the server time see at your clock on your hand or in the computer and just add or minus the hours needed, I mean change the GMT to + or - something.. smile.gif

I personally use .htaccess that I wouldn't need to do it in all the PHP stuff everytime, like this:

CODE
php_value date.timezone "Europe/Vilnius"

php_value date.default_latitude 54.7233

php_value date.default_longitude 25.2233

php_value date.sunrise_zenith 90.833333

php_value date.sunset_zenith 90.833333


So you can change whatever you want or the settings you live in, for example this cooridantes are the place I live in ~1km radius biggrin.gif

Just put the .htaccess file in your root directory, before public_html if you want it to work everywhere.. smile.gif

 

 

 


Reply

yordan
By the way, from a semantic point of view as well as from a generalized relativity theory point of view... dry.gif
Doing this you are not changing the astahost computer server time, you are changing the way the connected users see the system clock.

Reply

Feelay
I know tongue.gif But, I have "last login" on my website, and I am going to add a clock. And why would a user in The USA know how much the clock is here in sweden tongue.gif?

Reply

yordan
I think that this is exactly what the astahost forum precisely does : I see that your previous post is dated five minutes ago, in terms of my local time. And probably, your local time is not mine, and is not astahost's city time.

Reply

Feelay
Well.. atm, it is 18:25 here, but the forums time is 18:35 xD
But I understand what you mean tongue.gif

Reply

Feelay
can you help me find a code that will show the localtime on the users pc. can't find any =/

Thanks //Feelay

(EDIT: I just realized that i have double posted. didn't see that earlier. I am veryvery sorry for that.)

Reply

toby
CODE
now=new Date();
  hour=now.getHours();
  min=now.getMinutes();
  sec=now.getSeconds();

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Recent Queries:-
  1. how to set time on server - 1.16 hr back. (1)
  2. htaccess server time - 2.78 hr back. (1)
  3. php "change server time" - 9.22 hr back. (1)
  4. how to change server time in php - 9.70 hr back. (1)
  5. how to change server time in joomla - 35.06 hr back. (1)
  6. date.default_latitude - 41.15 hr back. (1)
  7. server time .htaccess - 47.94 hr back. (2)
  8. change server time .htaccess - 111.97 hr back. (1)
  9. how to change the server time - 129.23 hr back. (1)
  10. php change server time - 79.38 hr back. (2)
  11. change server date - 132.53 hr back. (1)
  12. htaccess change server time - 146.94 hr back. (2)
  13. how to change server time - 163.15 hr back. (1)
  14. php change the server time - 165.88 hr back. (1)
Similar Topics

Keywords : change, server, time,

  1. Server Load
    Regarding account creation (2)
  2. #2002 - The Server Is Not Responding (or The Local Mysql Server's Socket Is Not Correctly Configured) ?
    (0)
    Nevermind.. It is working now.. But what was that? (when it tryed to enter phpMyAdmin i got this
    error: #2002 - The server is not responding (or the local MySQL server's socket is not correctly
    configured) ) ....
  3. Server Won't Connect To Radio
    (5)
    Hi. I recently purchased a radio for my website, but I'm having problems. I've made a
    script to go onto the radio server and get the stats, but it won't work. It just says that it
    can't connect. The url for my radio is http://208.100.38.3:10020 . Is there something on
    astahost that prevents you connecting to other ports?....
  4. Connection To Ftp Server Resetting
    (5)
    For some reason I can't connect to my FTP server! It was working fine yesterday, but when I
    tried to connect a minute ago, it said it could not login. I made a new account, and tried that, and
    now it logs in with any account, but the connection resets. I use Windows Explorer as my FTP Client.
    Can anyone help?....
  5. Secure Server Hosting?
    (2)
    Hi all, I'm looking into the hosting provided here and was just wondering if the websites will
    be on a secure server. E.g. Do they have an URL that starts with 'http s ://' I ask this
    because I plan on running CGIProxy and require a Secure Server for it. So, secure? Or not Secure?
    /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Thanks,
    Hosma.....
  6. Problems With Gamma Server
    MYSQL service is bouncing connections (2)
    Hey guys there seems to be a problem with teh MYSQL service on Gamma..ITs giving a "Too Many
    Connections" error message to any request its being given at the moment..also I notice that the
    trap17 hosted server seems to have the same errors..is that gamma server too? On the server status
    page its listing as the MYSQL service as up and running and ok ..but its not.. I think it needs a
    reboot..hopefully this can be sorted soon.. Thanks!!....
  7. Is This A Forum Or Hosting Server?
    (1)
    This is a forum or a hosting server?....
  8. Extracting Archive (zip, Gzip, Rar, Etc..) On Web Server!
    (3)
    /rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
    /rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> Is
    there any way To Extracting Arvieve (zip, gzip, rar, etc) on Web Server so i can upload file more
    faster.....
  9. Http On Gamma Server Down!
    And now it's up again (1)
    http://www.xisto.com/helpdesk/index.php?cmd=status HTTP on Gamma server has gone down! Why my
    server? Why? I think this is the first outage I can remember since the Panda server was tranferred
    to Gamma. And it's just gone up, even before I finished writing this. Wow. Talk about sorting
    it out quickly. I wonder what caused it.......
  10. How I Can Connect To Server
    (4)
    hi i want to install a chat room for my site installation document says: start server: type java
    -jar -server bribble-1.5.34.jar how i can connect to server....
  11. Is The Server Down Or Is It My Account ?
    (8)
    I keep trying to connect to http://www.mooreo.astahost.com (my web hosting account) and it says it
    can't connect. Just curious if it's down? Can anyone else access it. I deleted the
    index.php or .html file, but I haven't uploaded anything to it yet. I have sufficient credits.
    Any ideas? I read a previous topic about the hosts file, but why would that help? Any help is
    greatly appreciated. Oh, and just a curious question. Does astahost plan on upgrading to php 5.x
    and/or apache 2.x soon?....
  12. My Account?
    Is it still on the server? (4)
    Hello, I have a question about my account. Ive been away for quite a long time and now that I have
    more time and plan to keep my account. My credits were negative when I left. Now when I logged in
    Ive had 0. I read about the new credit system, but I have 10 credits now, may you reactivate my old
    account, or do I have to reapply for a new account with the same domain? my domain is
    http://vladimirx.info thanks a lot! vladimir....
  13. Panda Server Failure
    (3)
    I know that at the moment the panda server is down, and our files are all being transfered, etc, etc
    But are we still being charged for this? Seeing as our sites are going to be down for quite a
    while, shouldn't Hosting Credits be frosen where they are or something, after all, we a re
    effectively paying for nothing.....
  14. What Smtp Server Do You Use ?
    Along with your hosted domain here ... (6)
    Anybody using their own domains with astahost here like me ? When you create email addresses for
    your domain - receiving is no problem - you can connect to 110 directly by using your own domain
    name. But SMTP is missing. How do you send out mails using the email client ? Does anyone know a
    list of free smtp servers on the net ? I don't want to use my ISP's SMTP. Thanks
    /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> ....
  15. Server Status
    Check if you have problems (3)
    I have added a little script which may ensure that cpanel, ftp problems and downtime are the members
    connections at fault instead. Whenever you have a major problem like Cpanel down, please do not make
    a post in support about it untill u have waited alittle while and/or checked out the Server Status
    Script . This will hopefully save un-needed topics being created in this and other forums. ....

    1. Looking for change, server, time,






*SIMILAR VIDEOS*
Searching Video's for change, server, time,
advertisement




Change Server Time?