diff --git a/homeassistant/components/sensor/gtt.py b/homeassistant/components/sensor/gtt.py
index f0e141f354951332ff9061093a471eab092062fe..a64c743381df9ec41a280cfeb68c57150db1d287 100644
--- a/homeassistant/components/sensor/gtt.py
+++ b/homeassistant/components/sensor/gtt.py
@@ -79,8 +79,7 @@ class GttSensor(Entity):
     def update(self):
         """Update device state."""
         self.data.get_data()
-        next_time = datetime.strptime(
-            self.data.state_bus['time'][0]['run'], "%H:%M")
+        next_time = get_datetime(self.data.state_bus)
         self._state = next_time.isoformat()
 
 
@@ -99,8 +98,7 @@ class GttData:
     def get_data(self):
         """Get the data from the api."""
         self.bus_list = self._pygtt.get_by_stop(self._stop)
-        self.bus_list.sort(key=lambda b:
-                           datetime.strptime(b['time'][0]['run'], "%H:%M"))
+        self.bus_list.sort(key=get_datetime)
 
         if self._bus_name is not None:
             self.state_bus = self.get_bus_by_name()
@@ -113,3 +111,13 @@ class GttData:
         for bus in self.bus_list:
             if bus['bus_name'] == self._bus_name:
                 return bus
+
+
+def get_datetime(bus):
+    """Get the datetime from a bus."""
+    bustime = datetime.strptime(bus['time'][0]['run'], "%H:%M")
+    now = datetime.now()
+    bustime = bustime.replace(year=now.year, month=now.month, day=now.day)
+    if bustime < now:
+        bustime = bustime + timedelta(days=1)
+    return bustime