As in title . I want to add to my timer a time zone .
I try this :
int G = DateTime.Now.Kind;
but it throw an error .
How i could check timezone in winforms ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your code doesn’t work because
DateTime.Now.Kindreturns aDateTimeKindwhich is an enum and you have to explicitly cast it toint:or:
But as the others said, it doesn’t return the timezone. You should use: