Results 1 to 8 of 8

Thread: Timezone

  1. #1

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    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

  2. #2

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Re: Timezone

    any idea?

  3. #3
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,522

    Re: Timezone

    Waht framework version?


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Re: Timezone

    4.5.1

  5. #5
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Timezone

    Can you post the entire code?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  6. #6

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    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

  7. #7
    Fanatic Member TDQWERTY's Avatar
    Join Date
    Oct 2003
    Location
    Oporto & Leiria, Portugal / Luanda, Angola
    Posts
    972

    Re: Timezone

    I think this will help you and this one too.
    ::Winamp 5.xx id3v2 & modern skin support::
    ::NetCF DataGrid Programatically Scroll Example::
    Don't forget to rate posts from those who helped you solving your problem, clicking on and rating it.

  8. #8

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    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
  •  



Click Here to Expand Forum to Full Width