I apologize if I sounded snide - no offense was intended.  Anyway, your second email clarified things greatly and now I understand.  In Python, you need the 'time' object which is an idealized 24 hour day:

-----
>>> import datetime
>>> a = datetime.datetime.now()
>>> a
datetime.datetime(2013, 5, 2, 10, 42, 36, 877059)
>>> d = datetime.time(10, 42, 00)
>>> e = datetime.time(10, 43, 00)
>>> bool(d <= a.time() < e)
True
----------

https://twitter.com/varud
https://www.linkedin.com/in/adamcnelson


On Thu, May 2, 2013 at 9:50 AM, Bwana Lawi <mail2lawi@gmail.com> wrote:
Adam, read my question carefully.

No need to be snide about it. 
I have stated again that the starttime and endtime cannot be tied to a date.

Otherwise this would have been a simple comparison of julian times


On Thu, May 2, 2013 at 10:46 AM, Adam Nelson <adam@varud.com> wrote:
@francis I think he's using the word 'timestamp' loosely as the time of day.  But yes, as everyone agrees so far, just use the timestamp which has all the date information and then comparison is trivial.

Since we all seem to be having fun wasting time on a Thursday, I did it in Python for demonstration purposes.  I set 'a' to now and then 'b' to now a few seconds later and then arbitrarily set 'c' to a time within the period.  This is date-sensitive.

----------------
➜  ~  python     
Python 2.7.3 (default, Dec  5 2012, 11:30:37) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> a = datetime.datetime.now()
>>> a
datetime.datetime(2013, 5, 2, 10, 42, 36, 877059)
>>> b = datetime.datetime.now()
>>> b
datetime.datetime(2013, 5, 2, 10, 42, 50, 684714)
>>> c = datetime.datetime(2013, 5, 2, 10, 42, 49, 000000)
>>> c
datetime.datetime(2013, 5, 2, 10, 42, 49)
>>> bool(a <= b < c)
False
>>> bool(a <= c < b)
True
>>> 
-------------------



On Thu, May 2, 2013 at 9:37 AM, Francis Njenga <korefn@gmail.com> wrote:
A timestamp will have all these details and you can extract the relevant details from it.
I.e. datetime has both date and time. You can use the time or date where relevant.
This is the essence of a timestamp.


On Thu, May 2, 2013 at 10:31 AM, Peter Karunyu <pkarunyu@gmail.com> wrote:
@Lawi, does the start times change per day or are they sorta fixed at a preset time?

Say, every day at 0600Hrs is the start, and every day at 1800Hrs is the end

_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke



--
Kore Francis Njenga
Running and Walking are only breaths apart.

_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke


_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke


_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke