/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


package data;

import java.util.Calendar;
import java.util.TimeZone;


public class TimeUtil
{
    public static String currentTime_HHMMSS()
    {

        //Calendar cal = Calendar.getInstance();
        int hour, minutes, seconds;        
        TimeZone tzSpain = TimeZone.getTimeZone("Spain");
        Calendar calendarSpain = Calendar.getInstance(tzSpain);

        hour = calendarSpain.get(Calendar.HOUR_OF_DAY);
        minutes = calendarSpain.get(Calendar.MINUTE);
        seconds = calendarSpain.get(Calendar.SECOND);


        return "" + ((hour<10)? ("0"+hour):(hour)) + ((minutes<10)? ("0"+minutes):(minutes)) + ((seconds<10)? ("0"+seconds):(seconds));
    }
}

