Jump to content

server time related


denny911

Recommended Posts

Hello everyone,i have uploaded my site for testing purposes. i use an MS database and when i open my site from localhost, dates and times are shown like this:28.12.2005 15:04:29But, when i open the same page from internet, the same date and time are shown like this:12/28/2005 8:04:29 AMi realize that the server time is used in both cases. since im in bosnia and herzegovina, the first date and time format are what i want.but, my hosting server is probably somewhere in USA (since the other time is 7 hours behind).Now, i want to know if there is any way to make my server display GMT+1 time instead of that of my hosting server?Any suggestions, anyone?THX

Link to comment
Share on other sites

You could find out where your host is and determine the hour difference. Then before displaying the date add/subtract the needed amount of hours.

DATEADD("h",7,NOW( ))

The above code adds 7 hours to the current date time.

Link to comment
Share on other sites

You could find out where your host is and determine the hour difference. Then before displaying the date add/subtract the needed amount of hours.
DATEADD("h",7,NOW( ))

The above code adds 7 hours to the current date time.

you see, i know for sure that the time difference is 7 hours. in my database i have the date/time fields which are filled automatically since their default value is set to Now()How can i change the time format of my hosting server to show the current time + 7hours and also to show date in this format: 31.12.2005 and not 12/31/2005?Thx
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...