| Reply | « Previous Thread | Next Thread » |
|
Hi,
This is my second post on python, well i tried to use the date .. like this.. import appuifw appuifw.query(u"Type a date:", "date", u"01/01/2008") Everytime i run it must display 01/01/2008 inside the dialog instead it displayes 01/01/1970, on emulator i tested this.. Does anyone know why this is behaving like that... i'm using S60_3rded_Fp2 ... i just was trying to learn python... Regards, Mateen Maldar "Whatever the mind can conceive and believe, the mind can achieve" "Of course there is no formula for success except perhaps an unconditional acceptance of life and what it brings"
Last edited by mateen_maldar : 2008-08-19 at 12:42.
Reason: Forgot that i posted on python already
|
| mateen_maldar |
| View Public Profile |
| Find all posts by mateen_maldar |
|
Hi Mateen,
I don't think so this is your first post on Python Forum ![]() want to build python src Quote:
Date and Time: Unix time, seconds since January 1, 1970, 00:00:00 UTC (Coordinated Universal Time), is generally used as the time format in the Python for Series 60 APIs described in this document. So it doesn't matter if you write, Code:
appuifw.query(u"Type a date:", "date", u"01/01/2008") or appuifw.query(u"Type a date:", "date", u"Mateen") And for time it doesn't matter if you write the following, Code:
appuifw.query(u"Type time:", "time", u"09:00") or appuifw.query(u"Type time:", "time", u"01/01/2008") or appuifw.query(u"Type Time:", "time", u"Mateen") Great to have one more FNC interested in PyS60 ![]() Best Regards, Croozeus |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
hi mateen
![]() ![]() great to see you in the python discussion boards ![]() ![]() Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Hi,
I will answer myself again asusual, as i'm not satisfied with the below explanation.. This is the exact reason for this behaviour. Quote:
Regards, Mateen Maldar "Whatever the mind can conceive and believe, the mind can achieve" "Of course there is no formula for success except perhaps an unconditional acceptance of life and what it brings"
Last edited by mateen_maldar : 2008-08-19 at 14:41.
Reason: typo
|
| mateen_maldar |
| View Public Profile |
| Find all posts by mateen_maldar |
|
I think thats due to implementation, as done in appuifwmodule.cpp where implementation is like this,
Code:
case R_APPUIFW_DATE_QUERY: case R_APPUIFW_TIME_QUERY: time = (rid == R_APPUIFW_DATE_QUERY) ? epoch_local_as_TReal() : 0.0; IDEAS is all they need but still they think only Genius can give them that. |
| shubhendra |
| View Public Profile |
| Find all posts by shubhendra |
|
Quote:
Confusing, isn't it? But it makes sense if you think what those queries return: epoch as a float (e.g. "1219229900.0"). So try this: Code:
import appuifw, time appuifw.query(u"Type a date:", "date", time.time()) appuifw.query(u"Type a time:", "time", time.time()) print time.time() |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| expire date validaton problem | ramarao | General Symbian C++ | 1 | 2008-01-29 07:28 |
| Sockets problem - C++ exe connecting to Python server | zahzaf | General Symbian C++ | 12 | 2007-09-27 14:07 |
| Socket problem - Python server - C++ exe client | zahzaf | Python | 1 | 2007-09-25 04:42 |
| Bluetooth Python Standalone APP problem | wallace_nogueira | Python | 0 | 2005-05-03 20:25 |
| Problem with Colon " : " Date Separator | rave_symbian | General Symbian C++ | 0 | 2004-12-07 09:39 |