Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# - Use app between 2 times and get the time from database

C# - Use app between 2 times and get the time from database

Scheduled Pinned Locked Moved C#
csharpdatabasemysqltutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Valakik
    wrote on last edited by
    #1

    Hello
    I am planning to make an app which could be used between defined times and if the time is not between the defined time then the app would give a warning and close the app.
    Originally thinking about making a parental control app for parents and their kids so the parents can tell when it is enough.

    I am using C# to make everything possible and I am using a database (MYSQL) to get the details.
    The following are my questions:
    Which way I should save in the database for different parents the timezone?
    How I make the app to use that timezone which the parents defined?
    If the parent will change the timezone while the app working and the time when the app can work then how the app will recognize that the data changed in the database?

    I am newbie and I would be thankful for example or open source and some explanation if it is possible.
    Thank you in advance all of the answers.

    D L 2 Replies Last reply
    0
    • V Valakik

      Hello
      I am planning to make an app which could be used between defined times and if the time is not between the defined time then the app would give a warning and close the app.
      Originally thinking about making a parental control app for parents and their kids so the parents can tell when it is enough.

      I am using C# to make everything possible and I am using a database (MYSQL) to get the details.
      The following are my questions:
      Which way I should save in the database for different parents the timezone?
      How I make the app to use that timezone which the parents defined?
      If the parent will change the timezone while the app working and the time when the app can work then how the app will recognize that the data changed in the database?

      I am newbie and I would be thankful for example or open source and some explanation if it is possible.
      Thank you in advance all of the answers.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Store all datetimes as UTC. Your UI, of course, will have to know this and display all datetimes converted to the system timezone and all input converted to UTC for storage in the database.

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
      Dave Kreskowiak

      1 Reply Last reply
      0
      • V Valakik

        Hello
        I am planning to make an app which could be used between defined times and if the time is not between the defined time then the app would give a warning and close the app.
        Originally thinking about making a parental control app for parents and their kids so the parents can tell when it is enough.

        I am using C# to make everything possible and I am using a database (MYSQL) to get the details.
        The following are my questions:
        Which way I should save in the database for different parents the timezone?
        How I make the app to use that timezone which the parents defined?
        If the parent will change the timezone while the app working and the time when the app can work then how the app will recognize that the data changed in the database?

        I am newbie and I would be thankful for example or open source and some explanation if it is possible.
        Thank you in advance all of the answers.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        "Parents" don't set / change "time zones". Your app should use the appropriate setting of the operating system (date and time; culture). Windows automatically syncs the time when it has access to the internet; including daylight saving.

        It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups