image thumbnail


version (2.37 KB) by Andranik Valedi
Converts GMT time to local time taking into account local DST rules. Has dynamic DST evalution.


Updated 20 Apr 2009

View License

This code was made to automate the conversion of GMT time values to local time values. The code takes as input a date string in 'mm-dd-yy' format, and an array of Matlab numeric date values. The code only considers the decimal part of the input time array, and outputs an adjusted numeric date value array based on the input date string. The code is modifier-friendly and is easily changed to meet local rules by adjusting the input parameters at the top of the code.

PLEASE NOTE: int2strz.m M-File is required for this code to work. Download Mr. Carlos Adrian Vargas Aguilera's M-File at:

Place the file int2strz.m in your working directory.

Cite As

Andranik Valedi (2022). daylightGMT.m (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: int2strz.m

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!