TL; DR
ZonedDateTime.now().getDayOfMonth()
java.time
As others have commented, you seem to use and mix java.sql.Time , java.sql.Date , java.util.Date and java.util.Calendar .
All these nasty classes are now deprecated , superseded by java.time classes added in Java 8 and later. For earlier Android, see Recent Bullets below.
To get the current moment in a specific time zone, use ZonedDateTime .
The time zone is critical for determining the date. At any given moment, the date changes around the world by zone. For example, a few minutes after midnight in Paris, France is a new day, still "yesterday" in Montreal Quebec .
If no time zone is specified, the JVM implicitly applies the current default time zone. This default value may change at any time, so your results may vary. It is better to specify the desired / expected time zone explicitly as an argument.
Specify the time zone name in continent/region format, such as America/Montreal , Africa/Casablanca or Pacific/Auckland . Never use the abbreviation 3-4 letters, for example EST or IST , as they are not real time zones, and are not standardized and not even unique (!).
ZoneId z = ZoneId.of( "America/Montreal" ) ;
Skip the zone when asking for the current moment.
ZonedDateTime zdt = ZonedDateTime.now( z ) ; // Current moment as seen by the people of particular region.
Interview the desired parts.
Month month = zdt.getMonth() ; // Get `Month` enum object. int monthNumber = zdt.getMonthValue() ; // Get month number, 1-12 for January-December. int dayOfMonth = zdt.getDayOfMonth() ;
About java.time
The java.time framework is built into Java 8 and later. These classes will be replaced by the troublesome old legacy date and time classes, such as java.util.Date , Calendar and SimpleDateFormat .
The Joda-Time project, now in maintenance mode , we recommend switching to the java.time classes.
To learn more, see the Oracle Tutorial . And search for qaru for many examples and explanations. JSR 310 specification .
Where to get java.time classes?
The ThreeTen-Extra project extends java.time with additional classes. This project is proof of possible future additions to java.time. You can find some useful classes here, such as Interval , YearWeek , YearQuarter and more .