if ($post['dstonoff']===FALSE) { // DST is off, subtract an hour $post['tzoffset']--; } else { // DST is on, add an hour $post['tzoffset']++; }