WebSite X5Help Center

 
Vahid B.
Vahid B.
User

Help With Blog  en

Auteur : Vahid B.
Visité 1878, Followers 1, Partagé 32  
Mots-clés :: blog,problem,with

How can I change the information boxes in the Blog page? Why these 2 dates and times are not matching (The top one is the right one ) Please help me.

Posté le
8 RéPONSES
Vahid B.
Vahid B.
User
Auteur

cc

Lire plus
Posté le de Vahid B.
Cheeky Man
Cheeky Man
User

Wink

If you commented straight after the post you may find your server time is different to your local time.....

Check with your hosting company that it is set to your time zone!!

www.frankscybercafe.com

Lire plus
Posté le de Cheeky Man
Vahid B.
Vahid B.
User
Auteur

Thanks frank

 

This is the reply email from my  Web host company but i dont know what should I do with that . Please advise and also can somebody help me with the second part of my problem ( the Blog  information Boxes to send a post. How can I customize them?)

 

Thanks guys.

Applied on: Windows Hosting.

The server (and for others too) shows date time as per their physical location. Many webmasters (like me), require date time value as per my own location. This ASP script will get the GMT date time value from the server and add 5 hours, as per my GMT change.

<%

‘assigin gmt time difference with local to variable

my_gmt_diff = +5

‘ get current datetime of server

od = now()

‘server has location information so we get gmt time as per location

set oShell = CreateObject(“WScript.Shell”)

atb = “HKEY_LOCAL_MACHINE\System\CurrentControlSet\” &_

“Control\TimeZoneInformation\ActiveTimeBias”

offsetMin = oShell.RegRead(atb)

nd = dateadd(“n”, offsetMin, od)

my_local_datetime    = dateadd(“h”,my_gmt_diff,nd) ‘ to save on database (mm/dd/yyyy)

Response.Write my_local_datetime

%>

Lire plus
Posté le de Vahid B.
Vahid B.
Vahid B.
User
Auteur

Any Help??

Lire plus
Posté le de Vahid B.
Incomedia
Steve J.
Incomedia

Hello Vahid, you cannot use the script they gave you because it is ASP and not PHP.

The date of the post comes from your PC, the date of the comment comes from your server settings. So you have 2 possibilities: 

  1. change the time on your server (the provider has to do that)
  2. set the date of your post 1 day before when you add a post in WebSite X5

The second method is faster and it doesn't require any special programming code on your server Wink

Lire plus
Posté le de Steve J.
Vahid B.
Vahid B.
User
Auteur

Hi Steve

Thanks for you post, can you please explain more about the second method? I didnt get.

The post that I add  is right because is reading the time and date of my PC, but when somebody is sending something is reading from the server. Where can I fix this problem.

cheers

Lire plus
Posté le de Vahid B.
Vahid B.
Vahid B.
User
Auteur

Please help..

Lire plus
Posté le de Vahid B.
Incomedia
Steve J.
Incomedia

Yes! It's very simple. Today you create a new post (24 Oct 2011). Before you click on OK to save the post, you have simply to set the date 23 Oct 2011. In this way you will be sure to avoid the difference from your server time settings. Wink

Lire plus
Posté le de Steve J.