I had asked a question about comparing datetimes here:
https://groups.google.com/forum/?fromgroups=#!topic/web2py/2euU80vV2WE
The question was answered but I ran into another problem closely related,
so I made a sequel. Let's hope we don't have to suffer through a trilogy!
Here is what I am doing:
I have a model of appointments with a field for the date:
.
.
Field('appointment_date', 'date')
.
.<other fields>
and a controller that should grab all of today's appointments to be printed
out:
appointment_dates =
db(db.appointments.appointment_date==request.now.date()).select()
Here is the problem:
request.now.date() appears to get the time based on the server. So If the
server is say 5 hours ahead, once 7:00pm my time hits I'm going to be
looking at tomorrows appointments. (server hits midnight, day cycles but
I'm still 7:00pm yesterday)
When the controller goes to grab the day's appontments, is it possible to
somehow replace request.now.date() with the date of the users pc?
Otherwise I'm not really sure how else to go about this problem.
Thanks
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.