c# - Client datetime vs Server datetime -
i have c# web application has been installed in server , database in server. accessing application india. when user sign up, choose reporting date calender control has current system date time selected default , user creation date inserted background c# code. since using application in local country browser, that's why both dates different. there anyway resolve conflicts.
obuser.creationdate = datetime.now
instead of datetime.now
use: datetime.utcnow
. utcnow acording msdn:
gets datetime object set current date , time on computer, expressed coordinated universal time (utc).