import datetime
import random

def game_data(players, count):
    now = datetime.datetime.now()
    available_players = players.items()
    player = available_players[0]

    games = {}
    for game_id in xrange(1, count+1):
        playing = (player, random.choice(available_players[1:]))
        games[game_id] = {
            "id": game_id,
            "logURL": "about:blank",
            "winner": random.choice(playing)[1],
            "updates": [
                {
                    "status": "complete",
                    "time": str(now + datetime.timedelta(minutes=game_id))
                }
            ],
            "players": [{"id": player_id} for (_name, player_id) in playing]
        }

    return games

import datetime
import random

def game_data(players, count):
    now = datetime.datetime.now()
    available_players = players.items()
    player = available_players[0]

    games = {}
    for game_id in xrange(1, count+1):
        playing = (player, random.choice(available_players[1:]))
        games[game_id] = {
            "id": game_id,
            "logURL": "http://about:blank",
            "winner": random.choice(playing)[1],
            "updates": [
                {
                    "status": "complete",
                    "time": (now + datetime.timedelta(minutes=game_id)).isoformat()
                }
            ],
            "players": [{"id": player_id} for (_name, player_id) in playing]
        }

    return games

Use ISO formatted time stamps
Use ISO formatted time stamps

  import datetime
  import random
  
  def game_data(players, count):
      now = datetime.datetime.now()
      available_players = players.items()
      player = available_players[0]
  
      games = {}
      for game_id in xrange(1, count+1):
          playing = (player, random.choice(available_players[1:]))
          games[game_id] = {
              "id": game_id,
-             "logURL": "about:blank",
+             "logURL": "http://about:blank",
              "winner": random.choice(playing)[1],
              "updates": [
                  {
                      "status": "complete",
-                     "time": str(now + datetime.timedelta(minutes=game_id))
+                     "time": (now + datetime.timedelta(minutes=game_id)).isoformat()
                  }
              ],
              "players": [{"id": player_id} for (_name, player_id) in playing]
          }
  
      return games
  
Use ISO formatted time stamps
## Code Before:
import datetime
import random

def game_data(players, count):
    now = datetime.datetime.now()
    available_players = players.items()
    player = available_players[0]

    games = {}
    for game_id in xrange(1, count+1):
        playing = (player, random.choice(available_players[1:]))
        games[game_id] = {
            "id": game_id,
            "logURL": "about:blank",
            "winner": random.choice(playing)[1],
            "updates": [
                {
                    "status": "complete",
                    "time": str(now + datetime.timedelta(minutes=game_id))
                }
            ],
            "players": [{"id": player_id} for (_name, player_id) in playing]
        }

    return games

## Instruction:
Use ISO formatted time stamps
## Code After:
import datetime
import random

def game_data(players, count):
    now = datetime.datetime.now()
    available_players = players.items()
    player = available_players[0]

    games = {}
    for game_id in xrange(1, count+1):
        playing = (player, random.choice(available_players[1:]))
        games[game_id] = {
            "id": game_id,
            "logURL": "http://about:blank",
            "winner": random.choice(playing)[1],
            "updates": [
                {
                    "status": "complete",
                    "time": (now + datetime.timedelta(minutes=game_id)).isoformat()
                }
            ],
            "players": [{"id": player_id} for (_name, player_id) in playing]
        }

    return games
