Technical Blog

Python TimeDate functions

I needed a quick understanding of the Python 3.3.0 datetime functionality to do a difference in times across days. Python make it amazingly easy.

import datetime
from datetime import timedelta

# get current timedate
now = datetime.datetime.now()
print "now: " + str(now)
# get one day of time oneday = timedelta(days=1)
# make one day in the future and past
tomorrow = now + oneday
yesterday = now - oneday
print "tomorrow: " + str(tomorrow)
print "yesterday: " + str(yesterday)
# compare times
if now < tomorrow:
  print "now < tomorrow"
elif now > tomorrow:
  print "now > tomorrow"
else:
  print "now must be equal tomorrow"
if now > yesterday:
 print "now > yesterday"
elif now < yesterday:
 print "now < yesterday"
else:
 print "now = yesterday"

The expected results are:

CMD> python time.py
now: 2015-03-19 14:30:31.083000
tomorrow: 2015-03-20 14:30:31.083000
yesterday: 2015-03-18 14:30:31.083000
now < tomorrow
now > yesterday

I hope this helps someone.

Rackspace Cloud Load Balancer with Windows 2012 IIS

I’m working on a problem with Windows 2012 RTM server running an IIS web service. To load balance it, we decided to use Rackspace Cloud Load Balancers. Periodically we receive some errors that appear in the system event logs.

"A fatal alert was generated and sent to the remote endpoint. This may result in termination of the connection. The TLS protocol defined fatal error code is 40. The Windows SChannel error state is 1205."

Downgrading VMware ESXi 5.5 virtual machine hardware

One of this issues I ran into with bouncing between VMware Player 6.0.3 and my VMware ESXi 5.5u1 server is the hardware level of the virtual machines. ESXi 5.5 without the vSphere licence will not manage the newer virtualHW.version = “10″ virtual machines.

Home Renovation & Graduate school

I’ve been busy with remodeling and renovations at home and the beach house. Also getting ready for going to graduate school at the Georgia Institute of Technology OMSCS program and that has kind of kept me busy.

The ESXi work and other technical fun stuff has been put on hold for awhile until I can get my free time free again. That always seems to be the case.

I’ve got a couple of articles in the hopper that I have not had time to polish for release on integrating Active Directory & Kerberos on Ubuntu LTS 14.04 with Windows 2003/2008 servers and remote desktop access using a tool called Guacamole.

Posts