You are here

function date_no_conversion in Date 5

Function to identify dates that must never have timezone conversion.

Parameters

object $date:

Return value

true or false

2 calls to date_no_conversion()
date_field_object in ./date.module
Use the Date API to get an object representation of a date field
date_set_date in ./date.inc
Function to set local and db date parts in the date object

File

./date.inc, line 323
Date/time API functions

Code

function date_no_conversion($date) {
  if (isset($date->local->parts['year']) && $date->local->parts['year'] < 1970) {
    return TRUE;
  }
  elseif (isset($date->db->parts['year']) && $date->db->parts['year'] < 1970) {
    return TRUE;
  }
  return FALSE;
}