Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Date Managment

my program needs to have access to exact date for selling date
now im in iran and our date is different from people in us or europe
(it's HEJRIE SHAMSI) should i code a date managment system or somehow i can use windows date?

thanks in advance

Comments

  • zibadianzibadian Posts: 6,349Member
    : my program needs to have access to exact date for selling date
    : now im in iran and our date is different from people in us or europe
    : (it's HEJRIE SHAMSI) should i code a date managment system or somehow i can use windows date?
    :
    : thanks in advance
    :
    :
    You should stick with a single date line (such as GMT or your local line) and let the server decide the date. Your client should either convert that date to client's local time, or clearly state which date line is used. Either of those choices is simple to code and not error-prone.
  • sad.boysad.boy Posts: 90Member
    : : my program needs to have access to exact date for selling date
    : : now im in iran and our date is different from people in us or europe
    : : (it's HEJRIE SHAMSI) should i code a date managment system or somehow i can use windows date?
    : :
    : : thanks in advance
    : :
    : :
    : You should stick with a single date line (such as GMT or your local line) and let the server decide the date. Your client should either convert that date to client's local time, or clearly state which date line is used. Either of those choices is simple to code and not error-prone.
    :
    ok despite this i should tell the user what's the date in his own method
    that is current in the country(i mean hejri shamsi) ,how can i convert it?


  • zibadianzibadian Posts: 6,349Member
    : : : my program needs to have access to exact date for selling date
    : : : now im in iran and our date is different from people in us or europe
    : : : (it's HEJRIE SHAMSI) should i code a date managment system or somehow i can use windows date?
    : : :
    : : : thanks in advance
    : : :
    : : :
    : : You should stick with a single date line (such as GMT or your local line) and let the server decide the date. Your client should either convert that date to client's local time, or clearly state which date line is used. Either of those choices is simple to code and not error-prone.
    : :
    : ok despite this i should tell the user what's the date in his own method
    : that is current in the country(i mean hejri shamsi) ,how can i convert it?
    :
    :
    :
    Let the server send it's date/time and then the client can subtract that from its local time to get the difference. The user can enter the date/time as local time and the client can add the difference to send the server's local time back to the server.
  • sad.boysad.boy Posts: 90Member
    : : : : my program needs to have access to exact date for selling date
    : : : : now im in iran and our date is different from people in us or europe
    : : : : (it's HEJRIE SHAMSI) should i code a date managment system or somehow i can use windows date?
    : : : :
    : : : : thanks in advance
    : : : :
    : : : :
    : : : You should stick with a single date line (such as GMT or your local line) and let the server decide the date. Your client should either convert that date to client's local time, or clearly state which date line is used. Either of those choices is simple to code and not error-prone.
    : : :
    : : ok despite this i should tell the user what's the date in his own method
    : : that is current in the country(i mean hejri shamsi) ,how can i convert it?
    : :
    : :
    : :
    : Let the server send it's date/time and then the client can subtract that from its local time to get the difference. The user can enter the date/time as local time and the client can add the difference to send the server's local time back to the server.
    :

    thanks,now if there is only one standalone computer running my app
    now any ideas?
  • zibadianzibadian Posts: 6,349Member
    [b][red]This message was edited by zibadian at 2006-10-4 0:4:42[/red][/b][hr]
    : : : : : my program needs to have access to exact date for selling date
    : : : : : now im in iran and our date is different from people in us or europe
    : : : : : (it's HEJRIE SHAMSI) should i code a date managment system or somehow i can use windows date?
    : : : : :
    : : : : : thanks in advance
    : : : : :
    : : : : :
    : : : : You should stick with a single date line (such as GMT or your local line) and let the server decide the date. Your client should either convert that date to client's local time, or clearly state which date line is used. Either of those choices is simple to code and not error-prone.
    : : : :
    : : : ok despite this i should tell the user what's the date in his own method
    : : : that is current in the country(i mean hejri shamsi) ,how can i convert it?
    : : :
    : : :
    : : :
    : : Let the server send it's date/time and then the client can subtract that from its local time to get the difference. The user can enter the date/time as local time and the client can add the difference to send the server's local time back to the server.
    : :
    :
    : thanks,now if there is only one standalone computer running my app
    : now any ideas?
    :
    Then you need to build a conversion table, or use a NTP server (http://en.wikipedia.org/wiki/Network_Time_Protocol) in the correct time-zone to form the server I was talking about.
    Building a conversion table isn't that hard to do, since the timezones are quite well described. All you need to know in which (part of) country the user is. This might help in making that table: http://en.wikipedia.org/wiki/Zoneinfo
  • sad.boysad.boy Posts: 90Member
    : [b][red]This message was edited by zibadian at 2006-10-4 0:4:42[/red][/b][hr]
    : : : : : : my program needs to have access to exact date for selling date
    : : : : : : now im in iran and our date is different from people in us or europe
    : : : : : : (it's HEJRIE SHAMSI) should i code a date managment system or somehow i can use windows date?
    : : : : : :
    : : : : : : thanks in advance
    : : : : : :
    : : : : : :
    : : : : : You should stick with a single date line (such as GMT or your local line) and let the server decide the date. Your client should either convert that date to client's local time, or clearly state which date line is used. Either of those choices is simple to code and not error-prone.
    : : : : :
    : : : : ok despite this i should tell the user what's the date in his own method
    : : : : that is current in the country(i mean hejri shamsi) ,how can i convert it?
    : : : :
    : : : :
    : : : :
    : : : Let the server send it's date/time and then the client can subtract that from its local time to get the difference. The user can enter the date/time as local time and the client can add the difference to send the server's local time back to the server.
    : : :
    : :
    : : thanks,now if there is only one standalone computer running my app
    : : now any ideas?
    : :
    : Then you need to build a conversion table, or use a NTP server (http://en.wikipedia.org/wiki/Network_Time_Protocol) in the correct time-zone to form the server I was talking about.
    : Building a conversion table isn't that hard to do, since the timezones are quite well described. All you need to know in which (part of) country the user is. This might help in making that table: http://en.wikipedia.org/wiki/Zoneinfo
    :

    thanks so usefull,
    and for all persian programmers i'm adding this link and it will solve
    the whole problem
    http://forum.delphiarea.com/viewtopic.php?t=10
  • badrabadra Posts: 14Member
    : : my program needs to have access to exact date for selling date
    : : now im in iran and our date is different from people in us or europe
    : : (it's HEJRIE SHAMSI) should i code a date managment system or somehow i can use windows date?
    : :
    : : thanks in advance
    : :
    : :

    : You should stick with a single date line (such as GMT or your local line) and let the server decide the date. Your client should either convert that date to client's local time, or clearly state which date line is used. Either of those choices is simple to code and not error-prone.

Sign In or Register to comment.