ParseTZBuffer() private static method

private static ParseTZBuffer ( string id, byte buffer, int length ) : TimeZoneInfo
id string
buffer byte
length int
return TimeZoneInfo
Esempio n. 1
0
 static TimeZoneInfo _GetTimeZone(string id, string name)
 {
     if (db == null)
     {
         return(null);
     }
     byte[] buffer = db.GetTimeZoneData(name);
     if (buffer == null)
     {
         return(null);
     }
     return(TimeZoneInfo.ParseTZBuffer(id, buffer, buffer.Length));
 }
Esempio n. 2
0
            static TimeZoneInfo _GetTimeZone(string name)
            {
                int start, length;

                using (var stream = GetTimeZoneData(name, out start, out length)) {
                    if (stream == null)
                    {
                        return(null);
                    }
                    byte[] buf = new byte [length];
                    Fill(stream, buf, buf.Length);
                    return(TimeZoneInfo.ParseTZBuffer(name, buf, length));
                }
            }