/// <summary>
 ///   Writes the <see cref="DateTimeZone" /> value to the stream.
 /// </summary>
 /// <param name="value">The value to write.</param>
 internal void WriteTimeZone(DateTimeZone value)
 {
     if (value == null)
     {
         WriteInt8(FlagTimeZoneNull);
         return;
     }
     else if (value is FixedDateTimeZone)
     {
         WriteInt8(FlagTimeZoneFixed);
     }
     else if (value is PrecalculatedDateTimeZone)
     {
         WriteInt8(FlagTimeZonePrecalculated);
     }
     else if (value is CachedDateTimeZone)
     {
         WriteInt8(FlagTimeZoneCached);
     }
     else if (value is DaylightSavingsTimeZone)
     {
         WriteInt8(FlagTimeZoneDst);
     }
     else
     {
         WriteInt8(FlagTimeZoneUser);
         WriteString(value.GetType().AssemblyQualifiedName);
     }
     value.Write(this);
 }