Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
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 18:46pm
Comments
Sandeep Mewara at 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
good
Please Sign up or sign in to vote.

Solution 1

use system.timezoneinfo class. it will only provide you server time zone info.
  Permalink  
Rate this: bad
good
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();
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.141015.1 | Last Updated 13 Oct 2012
Copyright © CodeProject, 1999-2014
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