Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Date Managment Posted by sad.boy on 2 Oct 2006 at 12:26 AM
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

Report
Re: Date Managment Posted by zibadian on 2 Oct 2006 at 4:14 AM
: 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.
Report
Re: Date Managment Posted by sad.boy on 3 Oct 2006 at 6:05 AM
: : 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?


Report
Re: Date Managment Posted by zibadian on 3 Oct 2006 at 11:08 AM
: : : 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.
Report
Re: Date Managment Posted by sad.boy on 3 Oct 2006 at 11:28 PM
: : : : 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?
Report
Re: Date Managment Posted by zibadian on 4 Oct 2006 at 12:02 AM
This message was edited by zibadian at 2006-10-4 0:4:42

: : : : : 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
Report
Re: Date Managment Posted by sad.boy on 5 Oct 2006 at 12:10 AM
: This message was edited by zibadian at 2006-10-4 0:4:42

: : : : : : 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
Report
Re: Date Managment Posted by badra on 8 Oct 2006 at 5:10 PM
: : 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.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.