Hi,

I think the date picker handles date/time internally in some way, so I
use my date picker this way:

picker.Date = date.ToLocalTime();

date = DateTime.SpecifyKind(picker.Date, DateTimeKind.Local).ToLocalTime();

Does that help?

Mikkel

On Tue, Jul 10, 2012 at 11:55 AM, Phil Cockfield <[email protected]> wrote:

> I'm using a *UIDatePicker *control in a pretty standard way (I think).
>  That is, I'm not setting much configuration at all at initialization:
>
> Control = new UIDatePicker(RectangleF.Empty){ AutoresizingMask =
> UIViewAutoresizing.FlexibleWidth };
>
>
> The problem is, when I read the selected *Date* value out of it, the
> AM/PM values are exactly the wrong way around.  Eg. 1PM is being returned
> as 1AM and vice versa.
>
> Here's a GIST of the entire code I've got (for context):
>
> https://gist.github.com/3082372
>
>
> Is this some kind of time-zone wierdness.  I'm in NZ.  Doesn't seem like
> it's time-zones though, because it's an exact reversal of the AM/PM values,
> not a shift in the time.
>
> Thanks!
> --
> *Phil *Cockfield
>
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to