Project

General

Profile

Feature #11957

Get timezone [for a given date]

Added by Carsten Rose 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
07.02.2021
Due date:
% Done:

100%

Estimated time:
Discuss:

Description

Es kommt immer wieder vor das man gerne die Timezone (CET oder CEST) fuer ein gegebenes Datum angeben moechte.

In PHP geht das einfach mit

$ts = strtotime('01.06.2021');
$offset = date("Z",$ts) / 3600;
switch( $offset ) {

  case 1: echo "CET"; break;
  case 2: echo "CEST"; break;
  default: $tz=sprintf("%+d",$offset); echo "GMT$tz" 
}

#1

Updated by Carsten Rose 9 months ago

  • Tracker changed from Support to Feature
#2

Updated by Carsten Rose 9 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
#3

Updated by Carsten Rose 9 months ago

  • Description updated (diff)
#4

Updated by Carsten Rose 8 months ago

  • Target version changed from 21.8.0 to 21.3.0

Also available in: Atom PDF