Click here to Skip to main content
16,012,821 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
My app uses click event from calender to populate a datetime stamp.
The problem is I'm in new zealand and the server is in USA/Canada.

While it runs fine in localhost during development, after upload to server
a double click on "Today" gives me yesterdays date.

I contacted the server help desk (thought they might help ha ha) and they gave me the catch all "see your developer" answer, or "we have got ur money now beat it bitch" (tongue in cheek)

(For those who don't know the above line is supposed to be a joke ha ha :-))


Anyway, is there a way to make the calender pick up client side time date stamp?
someone must have come up against this one before?

Thanks in advance for any suggestions

Paul

PS seems there is no silver bullet for this one only workarounds :-) am I right???
Posted
Updated 1-Dec-11 4:39am
v4
Comments
Philippe Mori 26-Nov-11 12:26pm    
Definitively, it is not the problem of your service provider but the problem of the developer.

By the way, it is normal to not expect them to do your development when the monthly fee is often less than the hourly salary of one programmer.

The support is mainly to get help for issue specific to their hosting. By the way, you get test it locally on a network if you change the timezone of one of the computer (and make the server accessible)

You can ask the user to tell in which time zone he reside and save that on the server and then convert all time from local time to UTC time when storing them and convert them in the reverse direction otherwise.

I don't know for the ASP.NET calendar control. I use a jQuery calendar in my application. Also in my case, the user has to select its time zone once if he does not want to use UTC time. Once a time zone has been selected, all times are converted to that zone when I render the page and converted by to UTC when I save the page. By the way, I am using ASP.NET MVC.

Check if the ASP.NET calendar somehow allow you to specify the timezone to use. Using Google, I have found that:

http://msdn.microsoft.com/en-us/library/8k0f6h1h(v=VS.85).aspx[^]

By the way, it is generally easy to find answers on the web for most problem you might encounter using Google.
 
Share this answer
 
v2
Comments
It is what it is 26-Nov-11 14:29pm    
Yes; Your link proved to be the "Quick" fix for me. will flag yours as answer if nothing else pops up in a day or two.
Anyway people should check you link as it does contain useful stuff for calender.

Thanks for your input.
You could have a look at this and see if that helps you;
http://stackoverflow.com/questions/319367/how-to-convert-server-time-to-local-time[^]
 
Share this answer
 
Comments
It is what it is 26-Nov-11 14:25pm    
Yes; I wanted to try your answer but couldnt figure how to make it in VB.net
I tried C# to VB.NET translation tool but no cigar.
Thanks for ur input :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900