Donald Trump signs spending bill to keep US government going until September

US president Donald Trump with Australian prime minister Malcolm Turnbull (Pablo Martinez Monsivais/AP)

President Donald Trump has signed a one trillion US dollar spending bill to fund the government through to September, his first piece of major legislation.

The bill cleared both houses of Congress this week and Mr Trump signed it behind closed doors at his home in New Jersey, well ahead of a deadline of midnight on Friday for some government functions to begin shutting down.