# DateTime error (Daylight Savings Time)?

**URL:** <https://community.homey.app/t/datetime-error-daylight-savings-time/78126>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [March 20, 2023, 6:37pm UTC](https://community.homey.app/t/datetime-error-daylight-savings-time/78126 "2023-03-20T18:37:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Pat\_M](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pat_m/32/56295_2.png) [@Pat\_M](https://community.homey.app/u/Pat_M)\
**Post date:** [March 21, 2023, 12:43pm UTC](https://community.homey.app/t/datetime-error-daylight-savings-time/78126/4 "2023-03-21T12:43:51Z")

</div>

> [@Actuele tijd weergeven inclusief secondes](https://community.homey.app/t/actuele-tijd-weergeven-inclusief-secondes/75247/2):
>
> ```auto
> return getCurrentTime("nl-NL","Europe/Amsterdam");
> 
> function getCurrentTime(locale, timezone){
> let date = new Date();
> return date.toLocaleString(locale,{timeZone: timezone });        
> //return date.toLocaleTimeString(locale,{timeZone: timezone });        
> //return date.toLocaleDateString(locale,{timeZone: timezone });        
> }
> 
> ```

Thank you, this worked!!!

---

_[View the full topic](https://community.homey.app/t/datetime-error-daylight-savings-time/78126)._
