Click here to Skip to main content
13,250,043 members (65,070 online)
Rate this:
Please Sign up or sign in to vote.
See more:
There are different date and time in client side in my website.But the date and time are shown in server side is different. So I can not count real time for some information depends on time. What to do reply me.
Posted 12-Oct-12 19:46pm
Sandeep Mewara 13-Oct-12 16:08pm
Store a standard time. Lets say GMT based. store all value accordingly and display in UI based on time zone of server.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

use system.timezoneinfo class. it will only provide you server time zone info.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I don't know if this is what your looking for.

// Make a new timer set its 
// Name = tmrClock
// Enabled = true
// Interval = 1000
// Make a new label set its
// Name = lblClock
// BorderStyle = FixedSingle
// Text = ""
// TextAlign = MiddleCenter
DateTime dtCurrentTime = new DateTime.Now;
lblClock.Text = dtCurrentTime.ToLongTimeString();

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171114.1 | Last Updated 13 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100