Help With Blog
Author: Vahid B.
Visited 1873,
Followers 1,
Shared 32
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.
Posted on the
Author
cc
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
Author
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
%>
Author
Any Help??
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:
The second method is faster and it doesn't require any special programming code on your server
Author
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
Author
Please help..
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.