field created with the Date module (Year, Month, Day, Hou">
I have in Drupal 7 the created content type called "GMT Time" with the fields:
"Time" (field_time) -> field created with the Date module (Year, Month, Day, Hour(24hour format), Minute)
"GMT Time" (field_gmt_time) -> field created with the Date module (Year, Month, Day, Hour (24hour format), Minute)
"Country Code" (field_country_code) -> created as text field
Is it possible to create a "Execute custom PHP code" rule in Rules module which would recalculate the selected time from the field_time into the GMT time into the field_gmt_time by the manualy entered field_country_code which would be in 2 letter format such as "US"? The rule would be created to trigger before saving content type.
And is it possible to also include the Daylight Saving Time and British Summer Time correction by the field_country_code?
Maybe somehow with help of the functions "new DateTime" and "DateTimeZone"? Maybe beginning with
$timezone = \DateTimeZone::listIdentifiers(\DateTimeZone::PER_COUNTRY, $node->field_country_code[LANGUAGE_NONE]['value']);
Many thanks for help.