Page MenuHomePhorge

D4271.1775170589.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D4271.1775170589.diff

diff --git a/lib/kolab_sync_timezone_converter.php b/lib/kolab_sync_timezone_converter.php
--- a/lib/kolab_sync_timezone_converter.php
+++ b/lib/kolab_sync_timezone_converter.php
@@ -57,6 +57,14 @@
)
);
+
+ protected $_legacyTimezones = array(
+ # This is an outdated timezone that outlook keeps sending because of an outdate timezone database on windows
+ 'Lv///0kAcgBhAG4AIABTAHQAYQBuAGQAYQByAGQAIABUAGkAbQBlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkABAADABcAOwA7AOcDAAAAAEkAcgBhAG4AIABEAGEAeQBsAGkAZwBoAHQAIABUAGkAbQBlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAwAEAAAAAAAAAAAAxP///w==' => array(
+ 'Asia/Tehran' => '+0330'
+ )
+ );
+
/**
* don't use the constructor. Use the singleton.
*
@@ -140,6 +148,9 @@
if (is_string($_offsets) && isset($this->_knownTimezones[$_offsets])) {
$timezones = $this->_knownTimezones[$_offsets];
}
+ elseif (is_string($_offsets) && isset($this->_legacyTimezones[$_offsets])) {
+ $timezones = $this->_legacyTimezones[$_offsets];
+ }
else {
if (is_string($_offsets)) {
// unpack timezone info to array
diff --git a/tests/timezone_converter.php b/tests/timezone_converter.php
--- a/tests/timezone_converter.php
+++ b/tests/timezone_converter.php
@@ -29,6 +29,13 @@
$this->assertTrue(is_array($output));
$this->assertTrue(isset($output['Asia/Tehran']));
+
+ # As seen in outlook
+ $converter = kolab_sync_timezone_converter::getInstance();
+ $output = $converter->getListOfTimezones('Lv///0kAcgBhAG4AIABTAHQAYQBuAGQAYQByAGQAIABUAGkAbQBlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkABAADABcAOwA7AOcDAAAAAEkAcgBhAG4AIABEAGEAeQBsAGkAZwBoAHQAIABUAGkAbQBlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAwAEAAAAAAAAAAAAxP///w==');
+
+ $this->assertTrue(is_array($output));
+ $this->assertTrue(isset($output['Asia/Tehran']));
}
function data_get_timezone()

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 2, 10:56 PM (2 d, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18821366
Default Alt Text
D4271.1775170589.diff (1 KB)

Event Timeline