Exabytes and time

I was doing one freelance work where I had to use LAMP technology. So my client has ordered hosting from Exabytes. Interestingly I had some bugs on theirs servers. I digged some more and I find out that their PHP time is wrong. Here’s the screenshot:

time.jpg

As you can see from the screenshot the server shows a date with more then 1 day difference! Well, I’ve never bothered to check if the servers were from US or local, I was under impression that they were local. Well, seems like not! So that’s how I get a almost a day difference in dates!

I used very basic date functions to get the date shown on their servers. The code is taken from php.net and now I need to add the difference to get Malaysian time.

I will post my solutions here, stay tuned!

Update:  I used very simple code:

$h = “-8″;// Hour for time zone goes here e.g. +7 or -4, just remove the + or -
$hm = $h * 60;
$ms = $hm * 60;

if (!$date) {
$date=date(”Y-m-d”);
$getdate = gmdate(”Y-m-d”, time()-($ms));

}

Comments

6 Responses to “Exabytes and time”

  1. Chan - Exabytes on March 28th, 2007 1:13 am

    Hello Admin,
    I guess your client’s account is hosted in our US server, hence it is showing US Standard Mountain Time which is GMT -0700.

    If your client wish to move back to our Malaysia server, please feel free to contact our Customer Service.

    - CHAN

  2. yashar on March 29th, 2007 1:42 am

    Dozya…
    Ty sam vse eto napisal? Sayt?

    Ya b tozhe hotel by takoy. Avtonomniy ot vsego.

    Ty zametil na moy blog v den’ zahodit okolo 1 200 chelovek. NA etoy nedele nachalos’. Vidimo horosho postaralas’ komanda Li.ru :) s optimizaciey.

  3. yashar on March 29th, 2007 8:54 am

    Mice check…

  4. yashar on March 31st, 2007 8:28 am

    Chuvak. Esli ya sebe takoy sdelayu. Ya budu babki zarabatyvat’? Ne znaesh’ mogu li ya postavit’ reklamu google, u sebya?

  5. admin on March 31st, 2007 9:44 am

    Dear Yashar,
    yes you can setup such blog and make money online. Indeed a lot of people are now successfully making money on advertising.

    If you want let’s discuss in private this matter and I can guide you through.

  6. yashar on April 14th, 2007 8:52 am

    Let’s… e-mail me :)

Leave a Reply

You must be logged in to post a comment.

Categories


Clicky Web Analytics