Untitled - Posted on July Tue 6th 9:53 PM (Never Expires) - Format: php
  1.    $optionsArray = timezone_identifiers_list();
  2.     usort($optionsArray, function($a, $b) {
  3.       $aL =  explode('/', $a);
  4.       $bL =  explode('/', $b);
  5.       if ($aL[0] == $bL[0]){
  6.         $dateTimeA = new DateTime();
  7.         $dateTimeA->setTimeZone(new DateTimeZone($a));
  8.         $dateTimeAH = $dateTimeA->format('H:i');
  9.        
  10.         $dateTimeB = new DateTime();
  11.         $dateTimeB->setTimeZone(new DateTimeZone($b));
  12.         $dateTimeBH = $dateTimeA->format('H:i');
  13.         return ($dateTimeA < $dateTimeB) ? -1 : 1;
  14.       }
  15.       return ($aL[0] < $bL[0]) ? -1 : 1;
  16.     });
  17.  
  18. /**
  19. Current output
  20.  
  21. Africa/Abidjan (03:49)
  22. Africa/Mbabane (05:49)
  23. Africa/Kinshasa (04:49)
  24. Africa/Lagos (04:49)
  25. Africa/Libreville (04:49)
  26. Africa/Lome (03:49)
  27. Africa/Luanda (04:49)
  28. Africa/Lubumbashi (05:49)
  29. Africa/Lusaka  (05:49)
  30.  
  31. America/Montevideo (00:49)
  32. America/Nome  (19:49)
  33. America/Montserrat (23:49)
  34. America/Monterrey (22:49)
  35. America/Nassau (23:49)
  36. America/New_York (23:49)
  37. America/Nipigon  (23:49)
  38. America/Ojinaga  (21:49)
  39. America/Noronha  (01:49)
  40. **/

New Paste

Paste Options

Recent Pastes

35 days ago

Untitled

43 days ago

Untitled

43 days ago

Untitled

43 days ago

Untitled

43 days ago

Untitled

43 days ago

Untitled

43 days ago

Untitled

393 days ago

Read file

406 days ago

Untitled

406 days ago

Untitled