# Incorrect time shown on iOS due to British Summer Time (BST)

**URL:** <https://forum.ionicframework.com/t/incorrect-time-shown-on-ios-due-to-british-summer-time-bst/126251>\
**Category:** ionic-v3\
**Created:** [March 28, 2018, 9:48pm UTC](https://forum.ionicframework.com/t/incorrect-time-shown-on-ios-due-to-british-summer-time-bst/126251 "2018-03-28T21:48:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trfletch](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/trfletch/32/115676_2.png) [@trfletch](https://forum.ionicframework.com/u/trfletch)\
**Post date:** [March 28, 2018, 9:48pm UTC](https://forum.ionicframework.com/t/incorrect-time-shown-on-ios-due-to-british-summer-time-bst/126251/1 "2018-03-28T21:48:02Z")

</div>

I have an Ionic App that has been live now for a couple of months on iOS and Android, however now that the clocks have gone forward in the UK by one hour it means the time is incorrect but only on iOS devices. Android shows the correct time and when I debug the App in browser (Chrome) it shows correctly.

I have checked my API and this is returning the correct time: “StartDate”: “2018-03-29T19:00:00”  
However in iOS this is being displayed as: 20:00

This is the code that I am using on the HTML page to display the date and time:

```auto
 <p>{{job.StartDate | date:'dd/MM/yyyy'}} @ {{ job.StartDate | date:'HH:mm' }}</p>
```

---

<div class="post-metadata">

**Author:** ![trfletch](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/trfletch/32/115676_2.png) [@trfletch](https://forum.ionicframework.com/u/trfletch)\
**Post date:** [April 3, 2018, 9:40am UTC](https://forum.ionicframework.com/t/incorrect-time-shown-on-ios-due-to-british-summer-time-bst/126251/2 "2018-04-03T09:40:35Z")

</div>

I resolved this by creating a new “pipe” that uses moment.js as follows:

```auto
@Pipe({
  name: "dateTimeFormat"
})
@Injectable()
export class DateTimeFormatPipe implements PipeTransform {
  transform(date: any, format: string): any {
    if (date) {
      return moment(date).format(format);
    }
  }
}

```

I then used that within my HTML as follows:

```auto
<p>{{job.StartDate | dateTimeFormat:'DD/MM/YYYY'}} @ {{ job.StartDate | dateTimeFormat:'HH:mm' }}</p>

```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:42pm UTC](https://forum.ionicframework.com/t/incorrect-time-shown-on-ios-due-to-british-summer-time-bst/126251/3 "2021-07-19T21:42:36Z")

</div>

Closed on July 19, 2021, 9:42pm UTC


