Overview

Packages

  • ActiveSync
  • None

Classes

  • Horde_ActiveSync_Message_Appointment
  • Horde_ActiveSync_Message_Attendee
  • Horde_ActiveSync_Message_Contact
  • Horde_ActiveSync_Message_Exception
  • Horde_ActiveSync_Message_Folder
  • Horde_ActiveSync_Message_Recurrence
  • Horde_ActiveSync_Message_Task
  • Horde_ActiveSync_State_Base
  • Horde_ActiveSync_State_History
  • Horde_ActiveSync_Timezone
  • Overview
  • Package
  • Class
  • Tree

Class Horde_ActiveSync_Timezone

Utility functions for dealing with Microsoft ActiveSync's Timezone format.

Copyright 2009-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Code dealing with searching for a timezone identifier from an AS timezone blob inspired by code in the Tine20 Project (http://tine20.org).

Package: ActiveSync
Category: Horde
Author: Michael J. Rubinsky mrubinsk@horde.org
Located at Horde/ActiveSync/Timezone.php
Methods summary
public static array
# getOffsetsFromSyncTZ( base64 $data )

Convert a timezone from the ActiveSync base64 structure to a TZ offset hash.

Convert a timezone from the ActiveSync base64 structure to a TZ offset hash.

Parameters

$data
timezone structure defined by MS as: <pre>typedef struct TIME_ZONE_INFORMATION { LONG Bias; WCHAR StandardName[<span class="php-num">32</span>]; SYSTEMTIME StandardDate; LONG StandardBias; WCHAR DaylightName[<span class="php-num">32</span>]; SYSTEMTIME DaylightDate; LONG DaylightBias;};</pre> With the SYSTEMTIME format being: <pre>typedef struct _SYSTEMTIME { WORD wYear; WORD wMonth; WORD wDayOfWeek; WORD wDay; WORD wHour; WORD wMinute; WORD wSecond; WORD wMilliseconds; } SYSTEMTIME, *PSYSTEMTIME;</pre> <p>See: http://msdn.microsoft.com/en-us/library/ms724950%28VS.85%29.aspx and: http://msdn.microsoft.com/en-us/library/ms725481%28VS.85%29.aspx</p>

Returns

array
Hash of offset information
public static string
# getSyncTZFromOffsets( array $offsets )

Build an ActiveSync TZ blob given a TZ Offset hash.

Build an ActiveSync TZ blob given a TZ Offset hash.

Parameters

$offsets
A TZ offset hash

Returns

string

A base64_encoded ActiveSync Timezone structure suitable for transmitting via wbxml.

public static
# getOffsetsFromDate( Horde_Date $date )

Create a offset hash suitable for use in ActiveSync transactions

Create a offset hash suitable for use in ActiveSync transactions

Parameters

$date
<p>A date object representing the date to base the the tz data on.</p>
public array
# getTimezone( array|string $offsets, string $expectedTimezone = null )

Attempt to guess the timezone identifier from the $offsets array.

Attempt to guess the timezone identifier from the $offsets array.

Parameters

$offsets
<p>The timezone to check. Either an array of offsets or an activesynz tz blob.</p>
$expectedTimezone
<p>The expected timezone. If not empty, and present in the results, will return.</p>

Returns

array
public array
# getListOfTimezones( array|string $offsets, string $expectedTimezone = null )

Get the list of timezone identifiers that match the given offsets, having a preference for $expectedTimezone if it's present in the results.

Get the list of timezone identifiers that match the given offsets, having a preference for $expectedTimezone if it's present in the results.

Parameters

$offsets
<p>Either an offset array, or a AS timezone structure.</p>
$expectedTimezone
The expected timezone.

Returns

array
An array of timezone identifiers
API documentation generated by ApiGen