Example #1
0
        internal static ResultCode ToPosixTime(TimeZoneRule rules, CalendarTime calendarTime, out long posixTime)
        {
            ResultCode error = TimeZone.ToPosixTime(rules, calendarTime, out posixTime);

            if (error != ResultCode.Success)
            {
                return(error);
            }

            return(ResultCode.Success);
        }
Example #2
0
        public ResultCode ToPosixTime(TimeZoneRule rules, CalendarTime calendarTime, out long posixTime)
        {
            ResultCode result;

            lock (_lock)
            {
                result = TimeZone.ToPosixTime(rules, calendarTime, out posixTime);
            }

            return(result);
        }
Example #3
0
        internal static uint ToPosixTime(TimeZoneRule rules, CalendarTime calendarTime, out long posixTime)
        {
            int error = TimeZone.ToPosixTime(rules, calendarTime, out posixTime);

            if (error != 0)
            {
                return(MakeError(ErrorModule.Time, error));
            }

            return(0);
        }
Example #4
0
        public ResultCode ToPosixTimeWithMyRules(CalendarTime calendarTime, out long posixTime)
        {
            ResultCode result;

            lock (_lock)
            {
                if (_isInitialized)
                {
                    result = ToPosixTime(_myRules, calendarTime, out posixTime);
                }
                else
                {
                    posixTime = 0;
                    result    = ResultCode.UninitializedClock;
                }
            }

            return(result);
        }
Example #5
0
 internal ResultCode ToPosixTimeWithMyRules(CalendarTime calendarTime, out long posixTime)
 {
     return(ToPosixTime(_myRules, calendarTime, out posixTime));
 }