-
Nov 24th, 2013, 12:39 AM
#1
Thread Starter
Frenzied Member
Timezone
Hi,
I'm completely new to XAML programming. I was trying to convert the time to show it in another time zone like this :
Code:
Dim localZone As System.TimeZoneInfo = TimeZoneInfo.ConvertTime(Date.Now, TimeZoneInfo.FindTimeZoneById("xxxxx"))
but TimeZoneInfo.FindTimeZoneById is not recognized by the system, anything I shud import or is there another way around?
Thank You
-
Dec 5th, 2013, 09:36 PM
#2
Thread Starter
Frenzied Member
-
Dec 5th, 2013, 11:24 PM
#3
Re: Timezone
Waht framework version?
-tg
-
Dec 5th, 2013, 11:28 PM
#4
Thread Starter
Frenzied Member
-
Dec 6th, 2013, 12:28 AM
#5
Re: Timezone
Can you post the entire code?
-
Dec 14th, 2013, 11:54 AM
#6
Thread Starter
Frenzied Member
Re: Timezone
Code:
' The Basic Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234237
Imports System
Imports System.TimeZoneInfo
Imports System.Globalization
Imports Microsoft.VisualBasic
''' <summary>
''' A basic page that provides characteristics common to most applications.
''' </summary>
Public NotInheritable Class MainPage
Inherits Common.LayoutAwarePage
''' <summary>
''' Populates the page with content passed during navigation. Any saved state is also
''' provided when recreating a page from a prior session.
''' </summary>
''' <param name="navigationParameter">The parameter value passed to
''' <see cref="Frame.Navigate"/> when this page was initially requested.
''' </param>
''' <param name="pageState">A dictionary of state preserved by this page during an earlier
''' session. This will be null the first time a page is visited.</param>
Protected Overrides Sub LoadState(navigationParameter As Object, pageState As Dictionary(Of String, Object))
Dim localZone As System.TimeZoneInfo = TimeZoneInfo.ConvertTime(Date.Now, TimeZoneInfo.FindTimeZoneById("xxxxx"))
End Sub
''' <summary>
''' Preserves state associated with this page in case the application is suspended or the
''' page is discarded from the navigation cache. Values must conform to the serialization
''' requirements of <see cref="Common.SuspensionManager.SessionState"/>.
''' </summary>
''' <param name="pageState">An empty dictionary to be populated with serializable state.</param>
Protected Overrides Sub SaveState(pageState As Dictionary(Of String, Object))
End Sub
End Class
-
Jan 10th, 2014, 03:49 AM
#7
Fanatic Member
Re: Timezone
I think this will help you and this one too.
-
Jan 10th, 2014, 05:08 AM
#8
Thread Starter
Frenzied Member
Re: Timezone
Hi, the issue I have is that TimeZoneInfo.FindTimeZoneById is not recognized by the system.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|