import { Component } from '@angular/core' ; @ Component ( { templateUrl : 'root-page.html' } ) export class RootPage { tokyoTime = this . calculateTime ( 1 ) ; calculateTime ( offset ) { const d = new Date ( ) ; const nd = new Date ( d . getTime ( ) + ( 3600000 * offset ) ) ; return nd . toISOString ( ) ; } }