I have MonoTouch app which process data from a webservice. This data contains date information which is specific to a timezone. The timezone is UTC +12 which is for New Zealand.
Use DateTime.Now
. This will give you system TimeZone Date and Time. Now convert that time to desired timezone time like this
var indianTime = TimeZoneInfo.ConvertTime (DateTime.Now,
TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"));
To get list of TimeZone run this method
ReadOnlyCollection<TimeZoneInfo> zones = TimeZoneInfo.GetSystemTimeZones();
Console.WriteLine("The local system has the following {0} time zones", zones.Count);
foreach (TimeZoneInfo zone in zones)
Console.WriteLine(zone.Id);
You can do it like:
Datetime date = TimeZoneInfo.ConvertTime(utcDateTime, timeZone);
Just pass the given parameters.
This is a bug in MonoTouch.
The fix will be included in a future version of MonoTouch (I don't know exactly which yet though).
In any case there is already a hotfix available.