http://bugzilla.novell.com/show_bug.cgi?id=621366

http://bugzilla.novell.com/show_bug.cgi?id=621366#c2


Miguel de Icaza <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Miguel de Icaza <[email protected]> 2010-07-14 16:15:18 UTC 
---
A quick workaround is to not use the implicit NSDate to DateTime conversion,
this is merely an operator implicit in MonoTouch.

This is the code that does the change, so you can just avoid this by having
your own routines with your own rules:


    public partial class NSDate {
        const long NSDATE_TICKS = 631139040000000000;

        public static implicit operator DateTime (NSDate d)
        {
            return new DateTime ((long)(d.SecondsSinceReferenceDate *
TimeSpan.TicksPerSecond + NSDATE_TICKS), DateTimeKind.Utc);
        }

        public static implicit operator NSDate (DateTime dt)
        {
            return FromTimeIntervalSinceReferenceDate ((dt.ToUniversalTime
().Ticks - NSDATE_TICKS) / TimeSpan.TicksPerSecond);
        }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to