(node *ast.Node)
| 12 | } |
| 13 | |
| 14 | func (t WithTimezone) Visit(node *ast.Node) { |
| 15 | if btin, ok := (*node).(*ast.BuiltinNode); ok { |
| 16 | switch btin.Name { |
| 17 | case "date", "now": |
| 18 | loc := &ast.ConstantNode{Value: t.Location} |
| 19 | ast.Patch(node, &ast.BuiltinNode{ |
| 20 | Name: btin.Name, |
| 21 | Arguments: append([]ast.Node{loc}, btin.Arguments...), |
| 22 | }) |
| 23 | } |
| 24 | } |
| 25 | } |