Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
Update (2014-12-16): I now greatly recommend to use the Joda Time library instead of this function:
http://joda-time.sourceforge.net/
I have been using the C# port Noda Time lately and it is perfectly suited for this kind of tasks.
-----------------
As I could find no built-in function nor reliable contribution to achieve that, I had no choice but to write my own, leveraging the GregorianCalendar Java class.
Usage is quite simple:
targetDST = TimezoneConvert( dn, fromTimezone, toTimezone )
The datenum dn corresponds to the datetime you want to convert. Just specify from which timezone it comes and the target timezone, and you should get the expected result, that takes into account daylight saving time.
Feel free to let me know if I can extend it to support more situations (like Julian Calendar, obviously ;-).
You can get the name of the available timezones using this command:
TimeZone.getAvailableIDs
after importing the relevant java packages.
import java.lang.String
import java.util.* java.awt.*
import java.util.Enumeration
Citation pour cette source
Erwin Mayer (2026). Convert between world time zones with daylight saving times (https://fr.mathworks.com/matlabcentral/fileexchange/27953-convert-between-world-time-zones-with-daylight-saving-times), MATLAB Central File Exchange. Extrait(e) le .
Remerciements
A inspiré : Timezone Convert by Erwin Mayer with vector support
Informations générales
- Version 1.1.0.0 (5,38 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.1.0.0 | Update (2014-12-16): I now greatly recommend to use the Joda Time library instead of this function:
|
||
| 1.0.0.0 |
