Project

General

Profile

Actions

Feature #11957

closed

Get timezone [for a given date]

Added by Carsten Rose about 3 years ago. Updated about 3 years ago.

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

100%

Estimated time:
Discuss:
Prio Planung:
Vote:

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" 
}

Actions #1

Updated by Carsten Rose about 3 years ago

  • Tracker changed from Support to Feature
Actions #2

Updated by Carsten Rose about 3 years ago

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

Updated by Carsten Rose about 3 years ago

  • Description updated (diff)
Actions #4

Updated by Carsten Rose about 3 years ago

  • Target version changed from next5 to 21.3.0
Actions

Also available in: Atom PDF