/*
 * [TestLocalTime.java]
 *
 * Summary: Display Today's date in modified Zulu format.
 *
 * Copyright: (c) 2009-2017 Roedy Green, Canadian Mind Products, http://mindprod.com
 *
 * Licence: This software may be copied and used freely for any purpose but military.
 *          http://mindprod.com/contact/nonmil.html
 *
 * Requires: JDK 1.8+
 *
 * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/
 *
 * Version History:
 *  1.0 2008-06-22
 */
package com.mindprod.example;

import java.text.SimpleDateFormat;
import java.util.Date;

import static java.lang.System.*;

/**
 * Display Today's date in modified Zulu format.
 *
 * @author Roedy Green, Canadian Mind Products
 * @version 1.0 2008-06-22
 * @since 2008-06-22
 */
public final class TestLocalTime
    {
    /**
     * Modified Zulu format mask 2008-06-22T07:57+46.438
     */
    private static final SimpleDateFormat SDF = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm'+'ss'.'SSS" );

    /**
     * Display current Local Time to the millisecond.
     * Display timestamp in form 2008-06-22T07:57+46.438
     * Similar to Zulu time, but
     * 1. uses local TimeZone.
     * 2. uses + as seconds separator.
     * 3. milliseconds rather than centiseconds
     * 4. no decorative trailing Z.
     *
     * @param args not used
     */
    public static void main( String[] args )
        {
        // Leave SDF TimeZone at the default locale.
        // Adjusts for local TimeZone and DST
        out.println( SDF.format( new Date() ) );
        }
    }