Click here to Skip to main content
15,905,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
DateTime thisDay = DateTime.Today;

String date = thisDay.ToString("d");


How to convert system date to pacific time in c#?

What I have tried:

started .
Posted
Updated 27-Apr-16 1:39am
Comments
Garth J Lancaster 27-Apr-16 7:40am    
its not 100% clear what you mean by 'pacific time' - do you mean a particular output format, or, you are in one timezone and wish to convert a date/time from your timezone into 'pacific time' timezone

Without a better definition/explanation the only thing I can point you at is https://msdn.microsoft.com/en-us/library/bb397769(v=vs.110).aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2
nikhil2015 27-Apr-16 7:50am    
i am in one timezone and wish to convert a date/time from my timezone into 'pacific time' timezone

DateTime thisDay = DateTime.Today;

String date = thisDay.ToString("d");

in string date i am getting current date.i need its corresponding pasific value
nikhil2015 27-Apr-16 7:55am    
i am working on server which is at US.its timezone is different from here.so that i need to convert date time in here to pasific
Shambhoo kumar 27-Apr-16 7:45am    
what do you mean by pacific time. you can try like this also.

DateTime date=DateTime.UtcNow;
nikhil2015 27-Apr-16 7:54am    
i am working on server which is at US.its timezone is different from here.so that i need to convert date time in here to pasific

1 solution

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