![]() ![]() This module is perhaps more complicated than it needs to be because it is designed to be very flexible in the way time shifts are specified and applied. A timezone will not be added to the date/time string. The only exception to this rule is that a 'Z' timezone is changed to '+00:00' notation if a timezone shift is applied. This means that the length of the date/time string will not change, and only the numbers in the string will be modified. The format of the original date/time value is not changed when the time shift is applied. '2.5 0' - 2 days 12 hours (date/time), 12 hours (time) orĪnd to save typing, a zero is assumed for any missing numbers: '1::' - shift by 1 hour (time, date/time) or 1 year (date)īelow are some specific examples applied to real date and/or time values ('Dir' is the applied shift direction: '+' is positive, '-' is negative): Original Value Shift Dir Shifted Value Numbers specified in shift fields may contain a decimal point: '1.5' - 1 hour 30 minutes (time, date/time), or 1 day (date) '1:0:0 0:0:0+5:0' - shift date by 1 year and timezone by 5 hoursĪ date shift is simply ignored if applied to a time value or visa versa. '0 15:30' - shift time by 15 hours and 30 minutes If two arguments are given, the date shift is first, followed by the time shift: '3:0:0 0' - shift date by 3 years '0:0:1' - shift 1 s (time, date/time), or 1 day (date) '5:0:0' - shift 5 hours (time, date/time), or 5 years (date) '2:0' - shift 2 hours (time, date/time), or 2 months (date) Value, or by one day if applied to a date value For example: '1' - shift by 1 hour if applied to a time or date/time If only one is provided, it is assumed to be a time shift when applied to a time-only or a date/time value, or a date shift when applied to a date-only value. '-h' - negative shift of timezone hours onlyĪ valid shift value consists of one or two arguments, separated by a space. '-h:m' - negative shift of timezone hours and minutes Timezone shifts are specified in the following formats: '+h:m' - shift timezone by 'h' hours and 'm' minutes ![]() Time-only values are shifted using the following formats: 'h:m:s' - shift time by 'h' hours, 'm' minutes and 's' seconds Here are some general rules and examples to explain how shift strings are interpreted:ĭate-only values are shifted using the following formats: 'Y:M:D' - shift date by 'Y' years, 'M' months and 'D' days Date-only and time-only values may also be shifted, and an optional timezone (eg. Time shifts are applied to standard EXIF-formatted date/time values (eg. Return value:Įrror string, or undef on success and the input date/time string is shifted by the specified amount. 2016:01:30 11:45:00).ġ) Shift string (see below) with optional leading sign for shift direction.Ģ) Direction of shift (-1 or +1), or 0 or undef to use the sign from the shift string.ģ) Reference to time-shift hash - filled in by first call to ShiftTime, and used in subsequent calls to shift date/time values by the same relative amount (see "TRICKY" section below).Ġ) Shift string (and $_ contains the input date/time string). $err = Image::ExifTool::ShiftTime($dateTime, $shift) Inputs:Ġ) Date/time string in EXIF format (eg. Shift date/time value use Image::ExifTool This module contains routines used by ExifTool to shift date and time values. Image::ExifTool:: - ExifTool time shifting routines DESCRIPTION ExifTool Date/Time Shift Module ExifTool Date/Time Shift Module
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |